BDE 4.14.0 Production release
|
#include <bsls_timeutil.h>
Static Public Member Functions | |
static void | initialize () |
static Types::Int64 | convertRawTime (OpaqueNativeTime rawTime) |
static Types::Int64 | getProcessSystemTimer () |
static void | getProcessTimers (Types::Int64 *systemTimer, Types::Int64 *userTimer) |
static Types::Int64 | getProcessUserTimer () |
static Types::Int64 | getTimer () |
static void | getTimerRaw (OpaqueNativeTime *timeValue) |
This struct
provides a namespace for a set of platform-neutral pure procedures to access real-time system clock functionality. High-resolution time functions intended for interval-timing return an interval in nanoseconds (1 nsec = 1E-9 sec) as a platform-independent 64-bit integer.
For maximum performance on some platforms where fetching the native clock is significantly faster than converting the fetched value to nanoseconds, this class also provides a "raw" method returning an opaque native time value and a conversion method returning a value in nanoseconds.
|
static |
Convert the specified rawTime
to a value in nanoseconds, referenced to an arbitrary but fixed origin, and return the result of the conversion. Note that this method is thread-safe only if initialize
has been called before.
|
static |
Return the instantaneous values of a platform-dependent timer for the current process system time in absolute nanoseconds referenced to an arbitrary but fixed origin. Note that this method is thread- safe only if initialize
has been called before.
|
static |
Load into the specified systemTimer
and userTimer
the instantaneous values of platform-dependent system timer and user timer in absolute nanoseconds referenced to an arbitrary but fixed origin. Note that this method is thread-safe only if initialize
has been called before.
|
static |
Return the instantaneous values of a platform-dependent timer for the current process user time in absolute nanoseconds referenced to an arbitrary but fixed origin. Note that this method is thread-safe only if initialize
has been called before.
|
static |
Return the instantaneous value of a platform-dependent system timer in absolute nanoseconds referenced to an arbitrary but fixed origin. Note that this method is thread-safe only if initialize
has been called before.
|
static |
Load into the specified timeValue
the value of an opaque, platform-dependent type representing the current time. timeValue
must be converted by the convertRawTime
method to conventional units (nanoseconds). This method is intended to facilitate accurate timing of small segments of code, and care must be used in interpreting the results. Note that this method is thread-safe only if initialize
has been called before.
|
static |
Do a platform-dependent initialization for the utilities. Note that the other methods in this component are guaranteed to be thread-safe only after calling this method.