Chapter 3. Timestamp Functions

Table of Contents

function::get_cycles — Processor cycle count
function::jiffies — Kernel jiffies count
function::HZ — Kernel HZ
function::gettimeofday_ns — Number of nanoseconds since UNIX epoch
function::gettimeofday_us — Number of microseconds since UNIX epoch
function::gettimeofday_ms — Number of milliseconds since UNIX epoch
function::gettimeofday_s — Number of seconds since UNIX epoch

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