summaryrefslogtreecommitdiff
path: root/gcc/ada/g-os_lib.ads
diff options
context:
space:
mode:
authorPascal Obry <obry@adacore.com>2007-04-06 11:16:52 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2007-04-06 11:16:52 +0200
commit320ae22ae0b8d417adf8da52e195eb9aaa026688 (patch)
treeb05c927f2fb13827bb29728a55d2c06716d3d7c7 /gcc/ada/g-os_lib.ads
parent2c851ddd1c40ec8c1adf8e92ce830e5e22b4a267 (diff)
downloadgcc-320ae22ae0b8d417adf8da52e195eb9aaa026688.tar.gz
g-os_lib.ads (Current_Time): New function.
2007-04-06 Pascal Obry <obry@adacore.com> Thomas Quinot <quinot@adacore.com> * g-os_lib.ads (Current_Time): New function. Returns the current system time as an OS_Time value. * s-osprim.ads (Clock): Add more precise definition of UNIX epoch. (Monotonic_Clock): Same. From-SVN: r123547
Diffstat (limited to 'gcc/ada/g-os_lib.ads')
-rw-r--r--gcc/ada/g-os_lib.ads23
1 files changed, 14 insertions, 9 deletions
diff --git a/gcc/ada/g-os_lib.ads b/gcc/ada/g-os_lib.ads
index 61a9eb7669d..f80dde982b4 100644
--- a/gcc/ada/g-os_lib.ads
+++ b/gcc/ada/g-os_lib.ads
@@ -114,6 +114,9 @@ package GNAT.OS_Lib is
subtype Second_Type is Integer range 0 .. 59;
-- Declarations similar to those in Calendar, breaking down the time
+ function Current_Time return OS_Time;
+ -- Return the system clock value as OS_Time
+
function GM_Year (Date : OS_Time) return Year_Type;
function GM_Month (Date : OS_Time) return Month_Type;
function GM_Day (Date : OS_Time) return Day_Type;
@@ -131,15 +134,16 @@ package GNAT.OS_Lib is
-- to create accesses to any of these functions.
procedure GM_Split
- (Date : OS_Time;
- Year : out Year_Type;
- Month : out Month_Type;
- Day : out Day_Type;
- 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.
+ (Date : OS_Time;
+ Year : out Year_Type;
+ Month : out Month_Type;
+ Day : out Day_Type;
+ Hour : out Hour_Type;
+ Minute : out Minute_Type;
+ Second : out Second_Type);
+ -- Analogous to the Split routine in Ada.Calendar, takes an OS_Time
+ -- and provides a representation of it as a set of component parts,
+ -- to be interpreted as a date point in UTC.
----------------
-- File Stuff --
@@ -836,6 +840,7 @@ package GNAT.OS_Lib is
private
pragma Import (C, Path_Separator, "__gnat_path_separator");
pragma Import (C, Directory_Separator, "__gnat_dir_separator");
+ pragma Import (C, Current_Time, "__gnat_current_time");
type OS_Time is new Long_Integer;
-- Type used for timestamps in the compiler. This type is used to hold