Load the current thread system and user CPU times in nanoseconds.

Synopsis

Declared in <bsls_timeutil.h>

static
void
getThreadTimers(
    Types::Int64* systemTimer,
    Types::Int64* userTimer);

Description

Load into the specified systemTimer and userTimer the instantaneous values of platform‐dependent system timer and user timer for the current thread, in absolute nanoseconds referenced to an arbitrary but fixed origin. Load ‐1 into both timers on platforms where per‐thread CPU timers are unavailable or in case of a system call failure. Note that this method is thread‐safe only if initialize has been called before.

Parameters

Name

Description

systemTimer

receives the thread system time in nanoseconds

userTimer

receives the thread user time in nanoseconds

Created with MrDocs