===================================================================
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -199,7 +199,8 @@
type clockid_t is private;
- CLOCK_REALTIME : constant clockid_t;
+ CLOCK_REALTIME : constant clockid_t;
+ CLOCK_MONOTONIC : constant clockid_t;
function clock_gettime
(clock_id : clockid_t;
@@ -539,7 +540,8 @@
pragma Convention (C, timespec);
type clockid_t is new int;
- CLOCK_REALTIME : constant clockid_t := 0;
+ CLOCK_REALTIME : constant clockid_t := 9;
+ CLOCK_MONOTONIC : constant clockid_t := 10;
type pthread_attr_t is new System.Address;
pragma Convention (C, pthread_attr_t);
===================================================================
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -185,7 +185,8 @@
type clockid_t is private;
- CLOCK_REALTIME : constant clockid_t;
+ CLOCK_REALTIME : constant clockid_t;
+ CLOCK_MONOTONIC : constant clockid_t;
function clock_gettime
(clock_id : clockid_t;
@@ -516,7 +517,8 @@
pragma Convention (C, timespec);
type clockid_t is new int;
- CLOCK_REALTIME : constant clockid_t := 0;
+ CLOCK_REALTIME : constant clockid_t := 0;
+ CLOCK_MONOTONIC : constant clockid_t := CLOCK_REALTIME;
--
-- Darwin specific signal implementation
===================================================================
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -202,7 +202,8 @@
type clockid_t is private;
- CLOCK_REALTIME : constant clockid_t;
+ CLOCK_REALTIME : constant clockid_t;
+ CLOCK_MONOTONIC : constant clockid_t;
function clock_gettime
(clock_id : clockid_t;
@@ -635,7 +636,8 @@
pragma Convention (C, timespec);
type clockid_t is new int;
- CLOCK_REALTIME : constant clockid_t := 0;
+ CLOCK_REALTIME : constant clockid_t := 0;
+ CLOCK_MONOTONIC : constant clockid_t := 4;
type pthread_t is new System.Address;
type pthread_attr_t is new System.Address;
===================================================================
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -182,7 +182,8 @@
type clockid_t is private;
- CLOCK_REALTIME : constant clockid_t;
+ CLOCK_REALTIME : constant clockid_t;
+ CLOCK_MONOTONIC : constant clockid_t;
function clock_gettime
(clock_id : clockid_t;
@@ -521,7 +522,8 @@
pragma Convention (C, timespec);
type clockid_t is new int;
- CLOCK_REALTIME : constant clockid_t := 1;
+ CLOCK_REALTIME : constant clockid_t := 1;
+ CLOCK_MONOTONIC : constant clockid_t := CLOCK_REALTIME;
type pthread_attr_t is new int;
type pthread_condattr_t is new int;
===================================================================
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -199,7 +199,8 @@
type clockid_t is private;
- CLOCK_REALTIME : constant clockid_t;
+ CLOCK_REALTIME : constant clockid_t;
+ CLOCK_MONOTONIC : constant clockid_t;
function clock_gettime
(clock_id : clockid_t;
@@ -517,7 +518,8 @@
pragma Convention (C, timespec);
type clockid_t is new unsigned_char;
- CLOCK_REALTIME : constant clockid_t := 0;
+ CLOCK_REALTIME : constant clockid_t := 1;
+ CLOCK_MONOTONIC : constant clockid_t := CLOCK_REALTIME;
type st_attr_t is record
stksize : int;
===================================================================
@@ -7,7 +7,7 @@
-- S p e c --
-- --
-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2011, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -189,7 +189,8 @@
type clockid_t is private;
- CLOCK_REALTIME : constant clockid_t;
+ CLOCK_REALTIME : constant clockid_t;
+ CLOCK_MONOTONIC : constant clockid_t;
function clock_gettime
(clock_id : clockid_t;
@@ -512,7 +513,8 @@
pragma Convention (C, timespec);
type clockid_t is new int;
- CLOCK_REALTIME : constant clockid_t := 0;
+ CLOCK_REALTIME : constant clockid_t := 3;
+ CLOCK_MONOTONIC : constant clockid_t := CLOCK_REALTIME;
type pthread_attr_t is record
pthread_attrp : System.Address;
===================================================================
@@ -666,7 +666,7 @@
Result : Interfaces.C.int;
begin
Result := clock_gettime
- (clock_id => CLOCK_REALTIME, tp => TS'Unchecked_Access);
+ (clock_id => CLOCK_MONOTONIC, tp => TS'Unchecked_Access);
pragma Assert (Result = 0);
return To_Duration (TS);
end Monotonic_Clock;