Chapter 3. Timestamp Functions

Table of Contents

get_cycles — Processor cycle count.
gettimeofday_ns — Number of nanoseconds since UNIX epoch.
gettimeofday_us — Number of microseconds since UNIX epoch.
gettimeofday_ms — Number of milliseconds since UNIX epoch.
gettimeofday_s — Number of seconds since UNIX epoch.

Each timestamp function returns a value to indicate when the function is executed. Thus, these returned values can be used to indicate when an event occurs, provide an ordering for events, or compute the amount of time elapsed between to time stamps.