Quick Links:

bal | bbl | bdl | bsl

Public Types | Static Public Member Functions

bsls::SystemClockType Struct Reference

#include <bsls_systemclocktype.h>

List of all members.

Public Types

enum  Enum { e_REALTIME, e_MONOTONIC }
 

Enumeration clock type values.

More...

Static Public Member Functions

static const char * toAscii (SystemClockType::Enum value)

Detailed Description

This struct provides a namespace for enumerating the set of system clock type for use in distinguishing which system clock to use for measuring time. See Enum in the TYPES sub-section for details.

See Component bsls_systemclocktype


Member Enumeration Documentation

Enumerator:
e_REALTIME 

System clock that returns the current wall time maintained by the system, and which is affected by adjustments to the system's clock (i.e., time values returned may jump "forwards" and "backwards" as the current time-of-day is changed on the system).

e_MONOTONIC 

System clock that returns the elapsed time since some unspecified starting point in the past. The returned values are monotonically non-decreasing, and are generally not affected by changes to the system time.


Member Function Documentation

static const char* bsls::SystemClockType::toAscii ( SystemClockType::Enum  value  )  [static]

Return the non-modifiable string representation corresponding to the specified enumeration value, if it exists, and a unique (error) string otherwise. The string representation of value matches its corresponding enumerator name with the "e_" prefix elided. For example:

will print the following on standard output:

          REALTIME

Note that specifying a value that does not match any of the enumerators will result in a string representation that is distinct from any of those corresponding to the enumerators, but is otherwise unspecified.


The documentation for this struct was generated from the following file: