Ada 编程/库/Ada.Real_Time
外观
此语言特性从 Ada 95 开始可用。
Ada.Real_Time 是 预定义语言环境 自 Ada 95 以来的一部分。
-- Standard Ada library specification -- Copyright (c) 2003-2018 Maxim Reznik <[email protected]> -- Copyright (c) 2004-2016 AXE Consultants -- Copyright (c) 2004, 2005, 2006 Ada-Europe -- Copyright (c) 2000 The MITRE Corporation, Inc. -- Copyright (c) 1992, 1993, 1994, 1995 Intermetrics, Inc. -- SPDX-License-Identifier: BSD-3-Clause and LicenseRef-AdaReferenceManual -- -------------------------------------------------------------------------package
Ada.Real_Timeis
type
Timeis
private
; Time_First :constant
Time; Time_Last :constant
Time; Time_Unit :constant
:= implementation_defined;type
Time_Spanis
private
; Time_Span_First :constant
Time_Span; Time_Span_Last :constant
Time_Span; Time_Span_Zero :constant
Time_Span; Time_Span_Unit :constant
Time_Span; Tick :constant
Time_Span;function
Clockreturn
Time;function
"+" (Left :in
Time; Right :in
Time_Span)return
Time;function
"+" (Left :in
Time_Span; Right :in
Time)return
Time;function
"-" (Left :in
Time; Right :in
Time_Span)return
Time;function
"-" (Left :in
Time; Right :in
Time)return
Time_Span;function
"<" (Left :in
Time; Right :in
Time)return
Boolean;function
"<=" (Left :in
Time; Right :in
Time)return
Boolean;function
">" (Left :in
Time; Right :in
Time)return
Boolean;function
">=" (Left :in
Time; Right :in
Time)return
Boolean;function
"+" (Left :in
Time_Span; Right :in
Time_Span)return
Time_Span;function
"-" (Left :in
Time_Span; Right :in
Time_Span)return
Time_Span;function
"-" (Right :in
Time_Span)return
Time_Span;function
"*" (Left :in
Time_Span; Right :in
Integer)return
Time_Span;function
"*" (Left :in
Integer; Right : Time_Span)return
Time_Span;function
"/" (Left :in
Time_Span; Right :in
Time_Span)return
Integer;function
"/" (Left :in
Time_Span; Right :in
Integer)return
Time_Span;function
"abs" (Right :in
Time_Span)return
Time_Span;function
"<" (Left :in
Time_Span; Right :in
Time_Span)return
Boolean;function
"<=" (Left :in
Time_Span; Right :in
Time_Span)return
Boolean;function
">" (Left :in
Time_Span; Right :in
Time_Span)return
Boolean;function
">=" (Left :in
Time_Span; Right :in
Time_Span)return
Boolean;function
To_Duration (TS :in
Time_Span)return
Duration;function
To_Time_Span (D :in
Duration)return
Time_Span;function
Nanoseconds (NS :in
Integer)return
Time_Span;function
Microseconds (US :in
Integer)return
Time_Span;function
Milliseconds (MS :in
Integer)return
Time_Span;function
Seconds (S :in
Integer)return
Time_Span;function
Minutes (M :in
Integer)return
Time_Span;type
Seconds_Countis
range
implementation_defined .. implementation_defined;procedure
Split (T :in
Time; SC :out
Seconds_Count; TS :out
Time_Span);function
Time_Of (SC :in
Seconds_Count; TS :in
Time_Span)return
Time;private
pragma
Import (Ada, Time);pragma
Import (Ada, Time_First);pragma
Import (Ada, Time_Last);pragma
Import (Ada, Time_Span);pragma
Import (Ada, Time_Span_First);pragma
Import (Ada, Time_Span_Last);pragma
Import (Ada, Time_Span_Zero);pragma
Import (Ada, Time_Span_Unit);pragma
Import (Ada, Tick);end
Ada.Real_Time;
外部示例
[编辑源代码]- 在以下位置搜索 示例:
Ada.Real_Time
:Rosetta Code,GitHub (gists),任何 Alire 包 或 此维基教科书。 - 在以下位置搜索与
Ada.Real_Time
相关的 帖子:Stack Overflow,comp.lang.ada 或 任何与 Ada 相关的页面。
FSF GNAT
- 规范:a-reatim.ads
- 主体:a-reatim.adb
drake