The ROme OpTimistic Simulator  3.0.0
A General-Purpose Multithreaded Parallel/Distributed Simulation Platform
timer.c File Reference

Timers. More...

#include <arch/timer.h>
+ Include dependency graph for timer.c:

Go to the source code of this file.

Functions

timer_uint timer_new (void)
 Gets a new starting point for an time interval measure. More...
 
timer_uint timer_value (timer_uint start)
 Computes a time interval measure using a previous timer_uint value. More...
 

Detailed Description

Timers.

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

Definition in file timer.c.

Function Documentation

◆ timer_new()

timer_uint timer_new ( void  )

Gets 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 the timer_value() macro to obtain a time interval with microsecond resolution

+ Here is the caller graph for this function:

◆ timer_value()

timer_uint timer_value ( timer_uint  start)

Computes 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