next up previous contents index
Weiter: D.8 Synchrone Task-Kontrolle Hinauf: D Echtzeitprogrammierung Zurück: Dynamische Prioritäten

Über die Zeit

Die Uhr vertreibt
meine Zeit
ins Nirgends
ich ringe um Raum
mit der zwölffingrigen
Null

Rose Ausländer 
Aus: ,,Die Uhr``

Das Paket Ada.Real_Time definiert eine Echtzeit:


package Ada.Real_Time is

type Time is private;
Time_First : constant Time;
Time_Last : constant Time;
Time_Unit : constant := implementation-defined-real-number;

type Time_Span is private;
Time_Span_First : constant Time_Span;
Time_Span_Last : constant Time_Span;
Time_Span_Zero : constant Time_Span;
Time_Span_Unit : constant Time_Span;

Tick : constant Time_Span;
function Clock return Time;

function "+" (Left : Time; Right : Time_Span) return Time;
function "+" (Left : Time_Span; Right : Time) return Time;
function "-" (Left : Time; Right : Time_Span) return Time;
function "-" (Left : Time; Right : Time) return Time_Span;

function "<" (Left, Right : Time) return Boolean;
function "<="(Left, Right : Time) return Boolean;
function ">" (Left, Right : Time) return Boolean;
function ">="(Left, Right : Time) return Boolean;

function "+" (Left, Right : Time_Span) return Time_Span;
function "-" (Left, Right : Time_Span) return Time_Span;
function "-" (Right : Time_Span) return Time_Span;

function "" (Left : Time_Span; Right : Integer) return Time_Span;
function "" (Left : Integer; Right : Time_Span) return Time_Span;
function "/" (Left,Right : Time_Span) return Integer;
function "/" (Left : Time_Span; Right : Integer) return Time_Span;

function "abs"(Right : Time_Span) return Time_Span;

function "<" (Left, Right : Time_Span) return Boolean;
function "<="(Left, Right : Time_Span) return Boolean;
function ">" (Left, Right : Time_Span) return Boolean;
function ">="(Left, Right : Time_Span) return Boolean;

function To_Duration (TS : Time_Span) return Duration;

function To_Time_Span (D : Duration) return Time_Span;

function Nanoseconds (NS : Integer) return Time_Span;
function Microseconds (US : Integer) return Time_Span;
function Milliseconds (MS : Integer) return Time_Span;

type Seconds_Count is range implementation-defined;

procedure Split(T : in Time; SC : out Seconds_Count; TS : out Time_Span);
function Time_Of(SC : Seconds_Count; TS : Time_Span) return Time;

private
... -notspecifiedbythelanguage
end Ada.Real_Time;

Von einer Implementation wird erwartet, daß sie genaue Angaben über etwaige Gangungenauigkeiten dieser Uhr und über die Genauigkeit einer Delay-Anweisung macht. Details finden sich im Ada Reference Manual [Ada95].



next up previous contents index
Weiter: D.8 Synchrone Task-Kontrolle Hinauf: D Echtzeitprogrammierung Zurück: Dynamische Prioritäten

Johann Blieberger
Wed Feb 11 09:58:52 MET 1998