|
|
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 - metrics - download
Length: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Counter, seg_0360b6, seg_03619d, seg_03638d
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦this⟧
with Time_Utilities;
use Time_Utilities;
with Text_Io;
package body Counter is
Started_Time : Time := Nil;
type Kind is
record
Count_Message : Integer := 0;
First_Laps : Duration := 0.0;
Laps : Duration := 0.0;
end record;
Total_Count : Integer := 0;
Elapsed_Time : Duration;
List_Count : array (Object.Class) of Kind;
type Myfloat is digits 2;
Minute : constant := 60.00;
function Convert_Laps (Laps : Duration) return Integer is
The_Interval : Interval;
Total : Myfloat;
begin
The_Interval := Convert (Laps);
Total := Myfloat (The_Interval.Elapsed_Seconds) +
(Myfloat (The_Interval.Elapsed_Minutes) * Minute);
return Integer (Total);
end Convert_Laps;
function Get_Max_Message return Integer is
Max : Integer := 0;
begin
for I in List_Count'Range loop
if List_Count (I).Count_Message > Max then
Max := List_Count (I).Count_Message;
end if;
end loop;
return Max;
end Get_Max_Message;
function Get_Messages (Class : Object.Class) return Integer is
begin
return List_Count (Class).Count_Message;
end Get_Messages;
function Get_Time (Class : Object.Class) return Integer is
begin
return Convert_Laps (List_Count (Class).Laps);
end Get_Time;
function Get_Total_Messages return Integer is
begin
return Total_Count;
end Get_Total_Messages;
function Get_Real_Time return Integer is
begin
if Convert_Laps (Elapsed_Time) > 0 then
return Convert_Laps (Elapsed_Time);
else
return 1;
end if;
end Get_Real_Time;
procedure Start_General_Counter is
begin
for I in List_Count'Range loop
List_Count (I).Count_Message := 0;
List_Count (I).Laps := 0.0;
end loop;
Started_Time := Get_Time;
Total_Count := 0;
Elapsed_Time := 0.0;
end Start_General_Counter;
procedure Increase (Class : Object.Class) is
begin
List_Count (Class).Count_Message :=
List_Count (Class).Count_Message + 1;
List_Count (Class).First_Laps := -Duration_Until (Started_Time);
end Increase;
procedure Stop_Time (Class : Object.Class) is
Laps_Now : Duration := 0.0;
begin
Laps_Now := -Duration_Until (Started_Time);
List_Count (Class).Laps :=
(Laps_Now - List_Count (Class).First_Laps) + List_Count (Class).Laps;
end Stop_Time;
procedure State_Message is
begin
Elapsed_Time := -Duration_Until (Started_Time);
for I in List_Count'Range loop
Total_Count := List_Count (I).Count_Message + Total_Count;
end loop;
end State_Message;
end Counter;
nblk1=7
nid=5
hdr6=a
[0x00] rec0=21 rec1=00 rec2=01 rec3=056
[0x01] rec0=23 rec1=00 rec2=04 rec3=042
[0x02] rec0=01 rec1=00 rec2=02 rec3=012
[0x03] rec0=1f rec1=00 rec2=06 rec3=028
[0x04] rec0=05 rec1=00 rec2=03 rec3=000
[0x05] rec0=13 rec1=00 rec2=07 rec3=006
[0x06] rec0=0f rec1=00 rec2=05 rec3=001
tail 0x21732f50884dd7ef21c33 0x42a00088462060003
Free Block Chain:
0x5: 0000 00 07 00 1a 80 02 65 3b 02 00 00 00 00 0c 65 6e ┆ e; en┆
0x7: 0000 00 00 03 fc 80 0a 53 65 63 6f 6e 64 73 20 3a 3d ┆ Seconds :=┆