diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 15:51:53 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-15 15:51:53 +0000 |
commit | 57b5da613404a43f2a614b15f24ce6cfb365d601 (patch) | |
tree | 32a64f782637f8109a200f94d059f7dbccee6682 /gcc/ada/a-reatim.adb | |
parent | d873da29f46ee2f4a7156c79cbbf775be880d4bf (diff) | |
download | gcc-57b5da613404a43f2a614b15f24ce6cfb365d601.tar.gz |
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
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@96486 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-reatim.adb')
-rw-r--r-- | gcc/ada/a-reatim.adb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ada/a-reatim.adb b/gcc/ada/a-reatim.adb index 352119ac5f6..b09a54e4d3f 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 -- ----------- |