Versione finale relazione
[toni-reis.git] / src / simulator-statistics.ads
blob89b9fe869cceddfc81f8e0bf1f7fae567c2f365c
1 with Ada.Calendar; use Ada.Calendar;
2 package Simulator.Statistics is
4 type RankingLine_T is record
5 Id : CarId_T;
6 Lap : Natural;
7 Sector : Natural;
8 ElapsedTime : Duration; -- tempo di gara trascorso
9 WakeupTime : Duration; -- tempo dell'ultimo risveglio
10 end record;
11 type RankingArray_T is array (Integer range 1 .. MaxId) of RankingLine_T;
13 protected Ranking is
14 procedure Insert( item : in RankingLine_T; pos:out Natural);
15 procedure Clear;
16 procedure GetWakeUpTime(id : in CarId_T; wakeUp :out Duration);
17 procedure GetElapsedTime(id : in CarId_T; elapsed :out Duration);
18 procedure GetLap(id : in CarId_T; lap :out Natural);
19 private
20 procedure Delete (item : in RankingLine_T);
21 procedure Search(id : in CarId_T; i : out Natural);
22 R : RankingArray_T;
23 N : Integer := 0;
24 end Ranking;
26 end Simulator.Statistics;