ROOT-Sim core  3.0.0-rc.2
A General-Purpose Multi-threaded Parallel/Distributed Simulation Library
Typedefs | Functions
timer.h File Reference

Timers. More...

#include <arch/platform.h>
#include <stdint.h>
#include <time.h>
Include dependency graph for timer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef uint_fast64_t timer_uint
 

Functions

static timer_uint timer_new (void)
 Get a new starting point for an time interval measure. More...
 
static timer_uint timer_value (timer_uint start)
 Compute a time interval measure using a previous timer_uint value. More...
 
static timer_uint timer_hr_new (void)
 Start a high resolution, CPU dependent time interval measure. More...
 
static timer_uint timer_hr_value (timer_uint start)
 Compute a time interval measure using a previous timer_uint value. More...
 

Detailed Description

Timers.

This header defines the timers which the simulator uses to monitor its internal behaviour

Typedef Documentation

◆ timer_uint

typedef uint_fast64_t timer_uint

The type used to store results of timer related calls

Function Documentation

◆ timer_hr_new()

timer_hr_new ( void  )
inlinestatic

Start a high resolution, CPU dependent time interval measure.

Returns
a timer_uint value, a not meaningful value by itself

The returned value can be used in conjunction with timer_hr_value() to measure a time interval with unspecified resolution

◆ timer_hr_value()

static timer_uint timer_hr_value ( timer_uint  start)
inlinestatic

Compute a time interval measure using a previous timer_uint value.

Parameters
starta timer_uint value obtained from a previous timer_hr_new() call
Returns
a timer_uint value, a measure of the time interval

◆ timer_new()

static timer_uint timer_new ( void  )
inlinestatic

Get a new starting point for an time interval measure.

Returns
a timer_uint value, a not meaningful value by itself

The returned value can be used in conjunction with timer_value() to measure a time interval with microsecond resolution

◆ timer_value()

static timer_uint timer_value ( timer_uint  start)
inlinestatic

Compute a time interval measure using a previous timer_uint value.

Parameters
starta timer_uint value obtained from a previous timer_new() call
Returns
a timer_uint value, the count of microseconds of the time interval