aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-reatim.adb
diff options
context:
space:
mode:
authorRobert Dewar <dewar@adacore.com>2005-03-15 16:51:53 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2005-03-15 16:51:53 +0100
commitf122ea71af3376a7d84f7a28a8fdb52b4111ad95 (patch)
tree32a64f782637f8109a200f94d059f7dbccee6682 /gcc/ada/a-reatim.adb
parent0f76876eeeea5bc90204418d4c78e46d757c9f92 (diff)
downloadgcc-f122ea71af3376a7d84f7a28a8fdb52b4111ad95.zip
gcc-f122ea71af3376a7d84f7a28a8fdb52b4111ad95.tar.gz
gcc-f122ea71af3376a7d84f7a28a8fdb52b4111ad95.tar.bz2
a-reatim.ads, [...]: Add functions Minutes and Seconds for AI-386.
2005-03-08 Robert Dewar <dewar@adacore.com> * a-reatim.ads, a-reatim.adb: Add functions Minutes and Seconds for AI-386. * a-retide.ads: Minor comment changes From-SVN: r96486
Diffstat (limited to 'gcc/ada/a-reatim.adb')
-rw-r--r--gcc/ada/a-reatim.adb20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ada/a-reatim.adb b/gcc/ada/a-reatim.adb
index 352119a..b09a54e 100644
--- a/gcc/ada/a-reatim.adb
+++ b/gcc/ada/a-reatim.adb
@@ -7,7 +7,7 @@
-- B o d y --
-- --
-- Copyright (C) 1991-1994, Florida State University --
--- Copyright (C) 1995-2003, Ada Core Technologies --
+-- Copyright (C) 1995-2005, Ada Core Technologies --
-- --
-- GNARL 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- --
@@ -154,6 +154,15 @@ package body Ada.Real_Time is
return Time_Span_Unit * MS * 1_000_000;
end Milliseconds;
+ -------------
+ -- Minutes --
+ -------------
+
+ function Minutes (M : Integer) return Time_Span is
+ begin
+ return Milliseconds (M) * Integer'(60_000);
+ end Minutes;
+
-----------------
-- Nanoseconds --
-----------------
@@ -163,6 +172,15 @@ package body Ada.Real_Time is
return Time_Span_Unit * NS;
end Nanoseconds;
+ -------------
+ -- Seconds --
+ -------------
+
+ function Seconds (S : Integer) return Time_Span is
+ begin
+ return Milliseconds (S) * Integer'(1000);
+ end Seconds;
+
-----------
-- Split --
-----------