File : a-retide-c.adb
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS --
4 -- --
5 -- A D A . R E A L _ T I M E . D E L A Y S --
6 -- --
7 -- B o d y --
8 -- --
9 -- Copyright (C) 1992-2015, Free Software Foundation, Inc. --
10 -- --
11 -- GNARL is free software; you can redistribute it and/or modify it under --
12 -- terms of the GNU General Public License as published by the Free Soft- --
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE. --
17 -- --
18 -- --
19 -- --
20 -- --
21 -- --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
26 -- --
27 -- GNARL was developed by the GNARL team at Florida State University. --
28 -- Extensive contributions were provided by Ada Core Technologies, Inc. --
29 -- --
30 ------------------------------------------------------------------------------
31
32 package body Ada.Real_Time.Delays is
33
34 -----------------
35 -- Delay_Until --
36 -----------------
37
38 procedure Delay_Until (T : Time) is
39 procedure RTS_Delay_Until (T : Time);
40 pragma Import (C, RTS_Delay_Until, "rts_delay_until");
41 begin
42 RTS_Delay_Until (T);
43 end Delay_Until;
44
45 -----------------
46 -- To_Duration --
47 -----------------
48
49 function To_Duration (T : Real_Time.Time) return Duration is
50 begin
51 return To_Duration (Time_Span (T));
52 end To_Duration;
53
54 end Ada.Real_Time.Delays;