diff options
Diffstat (limited to 'gcc/ada/g-os_lib.ads')
| -rw-r--r-- | gcc/ada/g-os_lib.ads | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ada/g-os_lib.ads b/gcc/ada/g-os_lib.ads index a8968c25c6c..bd4201fc5f7 100644 --- a/gcc/ada/g-os_lib.ads +++ b/gcc/ada/g-os_lib.ads @@ -93,6 +93,7 @@ pragma Elaborate_Body (OS_Lib); -- Time/Date Stuff -- --------------------- + type OS_Time is private; -- The OS's notion of time is represented by the private type OS_Time. -- This is the type returned by the File_Time_Stamp functions to obtain -- the time stamp of a specified file. Functions and a procedure (modeled @@ -102,8 +103,8 @@ pragma Elaborate_Body (OS_Lib); -- cases but rather the actual (time-zone independent) time stamp of the -- file (of course in Unix systems, this *is* in GMT form). - type OS_Time is private; Invalid_Time : constant OS_Time; + -- A special unique value used to flag an invalid time stamp value subtype Year_Type is Integer range 1900 .. 2099; subtype Month_Type is Integer range 1 .. 12; @@ -111,6 +112,8 @@ pragma Elaborate_Body (OS_Lib); subtype Hour_Type is Integer range 0 .. 23; subtype Minute_Type is Integer range 0 .. 59; subtype Second_Type is Integer range 0 .. 59; + -- Declarations similar to those in Calendar, breaking down the time + function GM_Year (Date : OS_Time) return Year_Type; function GM_Month (Date : OS_Time) return Month_Type; @@ -118,6 +121,7 @@ pragma Elaborate_Body (OS_Lib); function GM_Hour (Date : OS_Time) return Hour_Type; function GM_Minute (Date : OS_Time) return Minute_Type; function GM_Second (Date : OS_Time) return Second_Type; + -- Functions to extract information from OS_Time value function "<" (X, Y : OS_Time) return Boolean; function ">" (X, Y : OS_Time) return Boolean; @@ -135,6 +139,8 @@ pragma Elaborate_Body (OS_Lib); Hour : out Hour_Type; Minute : out Minute_Type; Second : out Second_Type); + -- Analogous to the routine of similar name in Calendar, takes an OS_Time + -- and splits it into its component parts with obvious meanings. ---------------- -- File Stuff -- |

