[#BloombergLP-bsls-TimeUtil] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bsls.adoc[bsls]::TimeUtil :relfileprefix: ../../ :mrdocs: This `struct` provides a namespace for platform‐neutral system‐clock procedures. == Synopsis Declared in `<bsls_timeutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct TimeUtil; ---- == Description 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. == Type Aliases [cols="1"] |=== | Name | xref:BloombergLP/bsls/TimeUtil/OpaqueNativeTime.adoc[`OpaqueNativeTime`] |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bsls/TimeUtil/convertRawTime.adoc[`convertRawTime`] | Convert an opaque native time value to nanoseconds. | xref:BloombergLP/bsls/TimeUtil/getProcessSystemTimer.adoc[`getProcessSystemTimer`] | Return the current process system CPU time in nanoseconds. | xref:BloombergLP/bsls/TimeUtil/getProcessTimers.adoc[`getProcessTimers`] | Load the current process system and user CPU times in nanoseconds. | xref:BloombergLP/bsls/TimeUtil/getProcessUserTimer.adoc[`getProcessUserTimer`] | Return the current process user CPU time in nanoseconds. | xref:BloombergLP/bsls/TimeUtil/getThreadSystemTimer.adoc[`getThreadSystemTimer`] | Return the current thread system CPU time in nanoseconds. | xref:BloombergLP/bsls/TimeUtil/getThreadTimers.adoc[`getThreadTimers`] | Load the current thread system and user CPU times in nanoseconds. | xref:BloombergLP/bsls/TimeUtil/getThreadUserTimer.adoc[`getThreadUserTimer`] | Return the current thread user CPU time in nanoseconds. | xref:BloombergLP/bsls/TimeUtil/getTimer.adoc[`getTimer`] | Return the current wall time in nanoseconds from a fixed origin. | xref:BloombergLP/bsls/TimeUtil/getTimerRaw.adoc[`getTimerRaw`] | Load the current time as an opaque platform‐dependent value. | xref:BloombergLP/bsls/TimeUtil/initialize.adoc[`initialize`] | Perform platform‐dependent initialization for these utilities. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#