PIP 1.0.0_rc3 Platform-Independent Primitives

Public Member Functions | Static Public Member Functions | List of all members
PITimeMeasurer Class Reference

Time measurements. More...

## Public Member Functions
void | reset ()
| Set internal time mark to current system time. More...
double | elapsed_n () const
| Returns nanoseconds elapsed from last reset() execution or from timer measurer creation.
double | elapsed_u () const
| Returns microseconds elapsed from last reset() execution or from timer measurer creation.
double | elapsed_m () const
| Returns milliseconds elapsed from last reset() execution or from timer measurer creation.
double | elapsed_s () const
| Returns seconds elapsed from last reset() execution or from timer measurer creation.
PISystemTime | elapsed () const
| Returns PISystemTime elapsed from last reset() execution or from timer measurer creation.
PISystemTime | reset_time ()
| Returns time mark of last reset() execution or timer measurer creation.

## Static Public Member Functions
static double | elapsed_system_n ()
| Returns nanoseconds representation of current system time.
static double | elapsed_system_u ()
| Returns microseconds representation of current system time.
static double | elapsed_system_m ()
| Returns milliseconds representation of current system time.
static double | elapsed_system_s ()
| Returns seconds representation of current system time.
static PISystemTime | elapsed_system ()
| Returns time mark of current system time.

## Detailed Description

Time measurements.

# Synopsis

Function reset() set time mark to current system time, then functions double elapsed_*() returns time elapsed from this mark. These functions can returns nano-, micro-, milli- and seconds with suffixes "n", "u", "m" and "s"

## Member Function Documentation

## ◆ reset()

void PITimeMeasurer::reset | ( |  | ) |
| inline

Set internal time mark to current system time.

This function used for set start time mark. Later you can find out elapsed time from this time mark to any moment of time with elapsed_s(), elapsed_m(), elapsed_u() or elapsed_n() functions.

See also
  elapsed_s(), elapsed_m(), elapsed_u(), elapsed_n()