DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦8aa5663e3⟧ Ada Source

    Length: 3072 (0xc00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Chronometre, seg_03120a

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



with Calendar;
package body Chronometre is

    Time_Init : constant Duration := 0.0;
    Time_Start : Calendar.Time;
    Time_Stop : Calendar.Time;

    procedure Reset (The_Chrono : in out Chronometre.Object) is
    begin
        if The_Chrono.The_State = Off then
            The_Chrono.The_Value := Time_Init;
        end if;
    end Reset;

    procedure Start (The_Chrono : in out Chronometre.Object) is
        use Calendar;
    begin
        if The_Chrono.The_State = Off then
            The_Chrono.The_State := On;  
            if The_Chrono.The_Value /= Time_Init then
                Time_Start := Calendar.Clock - The_Chrono.The_Value;
            else
                Time_Start := Calendar.Clock;
            end if;
        end if;
    end Start;


    procedure Stop (The_Chrono : in out Chronometre.Object) is  
        use Calendar; -- lisibilite pour l operateur "-" de calendar
    begin
        if The_Chrono.The_State = On then
            The_Chrono.The_State := Off;
            Time_Stop := Calendar.Clock;
            The_Chrono.The_Value := Time_Stop - Time_Start;
        end if;
    end Stop;


    function Get (The_Chrono : Chronometre.Object) return Duration is
        use Calendar; -- lisibilite pour l operateur "-" de calendar
    begin
        if The_Chrono.The_State = Off then
            return The_Chrono.The_Value;
        end if;
        return Calendar.Clock - Time_Start;
    end Get;
end Chronometre;

E3 Meta Data

    nblk1=2
    nid=0
    hdr6=4
        [0x00] rec0=21 rec1=00 rec2=01 rec3=052
        [0x01] rec0=11 rec1=00 rec2=02 rec3=001
    tail 0x2172afa1c84ba80caa0d9 0x42a00088462060003