|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - download
Length: 5120 (0x1400) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package Unix_Time, seg_0509ad
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
-- 4.2BSD interface to unix time functions with System; with C_Strings; with Unchecked_Conversion; package Unix_Time is subtype Time_T is Integer; type Time_T_Ptr is access Time_T; pragma Local_Access (Time_T_Ptr); function To_Time_T_Ptr is new Unchecked_Conversion (System.Address, Time_T_Ptr); type Timeval_Rec is record Tv_Sec : Integer; -- seconds Tv_Usec : Integer; -- and microseconds end record; type Timeval_Ptr is access Timeval_Rec; pragma Local_Access (Timeval_Ptr); function To_Timeval_Ptr is new Unchecked_Conversion (System.Address, Timeval_Ptr); type Timezone_Rec is record Tz_Minuteswest : Integer; -- minutes west of Greenwich Tz_Dsttime : Integer; -- type of dst correction end record; type Timezone_Ptr is access Timezone_Rec; pragma Local_Access (Timezone_Ptr); function To_Timezone_Ptr is new Unchecked_Conversion (System.Address, Timezone_Ptr); Dst_None : constant := 0; -- not on dst Dst_Usa : constant := 1; -- USA style dst Dst_Aust : constant := 2; -- Australian style dst Dst_Wet : constant := 3; -- Western European dst Dst_Met : constant := 4; -- Middle European dst Dst_Eet : constant := 5; -- Eastern European dst Dst_Can : constant := 6; -- Canada Dst_Gb : constant := 7; -- Great Britain and Eire Dst_Rum : constant := 8; -- Rumania Dst_Tur : constant := 9; -- Turkey Dst_Austalt : constant := 10; -- Australian style with shift in 1986 type Tm_Rec is record Tm_Sec : Integer; Tm_Min : Integer; Tm_Hour : Integer; Tm_Mday : Integer; Tm_Mon : Integer; Tm_Year : Integer; Tm_Wday : Integer; Tm_Yday : Integer; Tm_Isdst : Integer; end record; type Tm_Ptr is access Tm_Rec; pragma Local_Access (Tm_Ptr); function To_Tm_Ptr is new Unchecked_Conversion (System.Address, Tm_Ptr); type Tms is record Tms_Utime : Time_T; -- user time Tms_Stime : Time_T; -- system time Tms_Cutime : Time_T; -- user time, children; Tms_Cstime : Time_T; -- system time, children; end record; type Tms_Ptr is access Tms; function To_Tms_Ptr is new Unchecked_Conversion (System.Address, Tms_Ptr); function Ctime (Clock : Time_T_Ptr) return C_Strings.C_String; function Gmtime (Clock : Time_T_Ptr) return Tm_Ptr; function Localtime (Clock : Time_T_Ptr) return Tm_Ptr; function Asctime (Clock : Tm_Ptr) return C_Strings.C_String; function Timezone (Zone : Integer; Dst : Integer) return C_Strings.C_String; function Time (Clock : Time_T_Ptr) return Time_T; function Times (Times_Buf : Tms_Ptr) return Integer; -- gettimeofday and settimeofday are 4.2/4.3 BSD only. If you call -- them, your code will *not* port to UNIX System V/386. Are you -- 100% certain you can't use time() to do what you want? Time() -- is portable. -- function Gettimeofday (Tp : Timeval_Ptr; Tzp : Timezone_Ptr) return Integer; function Settimeofday (Tp : Timeval_Ptr; Tzp : Timezone_Ptr) return Integer; pragma Interface (C, Ctime); pragma Interface (C, Gmtime); pragma Interface (C, Localtime); pragma Interface (C, Asctime); pragma Interface (C, Timezone); pragma Interface (C, Time); pragma Interface (C, Times); pragma Interface (C, Gettimeofday); pragma Interface (C, Settimeofday); end Unix_Time;
nblk1=4 nid=0 hdr6=8 [0x00] rec0=22 rec1=00 rec2=01 rec3=004 [0x01] rec0=19 rec1=00 rec2=02 rec3=008 [0x02] rec0=1b rec1=00 rec2=03 rec3=044 [0x03] rec0=16 rec1=00 rec2=04 rec3=000 tail 0x21758042c878e79993c27 0x42a00088462060003