ARGOBOTS
Functions
Timer

Functions

double ABT_get_wtime (void)
 Get elapsed wall clock time. More...
 
int ABT_timer_create (ABT_timer *newtimer)
 Create a new timer. More...
 
int ABT_timer_dup (ABT_timer timer, ABT_timer *newtimer)
 Duplicate the timer. More...
 
int ABT_timer_free (ABT_timer *timer)
 Free the timer object. More...
 
int ABT_timer_start (ABT_timer timer)
 Start the timer. More...
 
int ABT_timer_stop (ABT_timer timer)
 Stop the timer. More...
 
int ABT_timer_read (ABT_timer timer, double *secs)
 Read the elapsed time of the timer. More...
 
int ABT_timer_stop_and_read (ABT_timer timer, double *secs)
 Stop the timer and read the elapsed time of the timer. More...
 
int ABT_timer_stop_and_add (ABT_timer timer, double *secs)
 Stop the timer and add the elapsed time of the timer. More...
 
int ABT_timer_get_overhead (double *overhead)
 Obtain the overhead time of using ABT_timer. More...
 

Detailed Description

This group is for Timer.

Function Documentation

double ABT_get_wtime ( void  )

Get elapsed wall clock time.

ABT_get_wtime() returns the elapsed wall clock time in seconds since an arbitrary time in the past. The resolution of elapsed time is at least a unit of microsecond.

Returns
Elapsed wall clock time in seconds

Definition at line 24 of file timer.c.

int ABT_timer_create ( ABT_timer newtimer)

Create a new timer.

ABT_timer_create() creates a new timer object and returns its handle through newtimer. If an error occurs in this routine, a non-zero error code will be returned and newtimer will be set to ABT_TIMER_NULL.

Parameters
[out]newtimerhandle to a new timer
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 42 of file timer.c.

Referenced by ABT_timer_get_overhead().

int ABT_timer_dup ( ABT_timer  timer,
ABT_timer newtimer 
)

Duplicate the timer.

ABT_timer_dup() creates a new timer and copies the time values from the timer of timer to the new timer. The handle of new timer will be returned through newtimer. If an error occurs in this routine, a non-zero error code will be returned and newtimer will be set to ABT_TIMER_NULL.

Parameters
[in]timerhandle to the timer to be duplicated
[out]newtimerhandle to a new timer
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 76 of file timer.c.

int ABT_timer_free ( ABT_timer timer)

Free the timer object.

ABT_timer_free() deallocates the memory used for the timer object associated with the handle timer. If it is successfully processed, timer is set to ABT_TIMER_NULL. Using the timer handle after calling ABT_timer_free() may cause undefined behavior.

Parameters
[in,out]timerhandle to the timer
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 113 of file timer.c.

Referenced by ABT_timer_get_overhead().

int ABT_timer_get_overhead ( double *  overhead)

Obtain the overhead time of using ABT_timer.

ABT_timer_get_overhead() returns the overhead time when measuring the elapsed time with ABT_timer. It computes the time difference in consecutive calls of ABT_timer_start() and ABT_timer_stop(). The resolution of overhead time is at least a unit of microsecond.

Parameters
[out]overheadoverhead time of ABT_timer
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 312 of file timer.c.

int ABT_timer_read ( ABT_timer  timer,
double *  secs 
)

Read the elapsed time of the timer.

ABT_timer_read() returns the time difference in seconds between the start time of timer (when ABT_timer_start() was called) and the end time of timer (when ABT_timer_stop() was called) through secs. The resolution of elapsed time is at least a unit of microsecond.

Parameters
[in]timerhandle to the timer
[out]secselapsed time in seconds
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 204 of file timer.c.

Referenced by ABT_timer_get_overhead().

int ABT_timer_start ( ABT_timer  timer)

Start the timer.

ABT_timer_start() starts the timer and saves the time when this routine is called. When this routine is called multiple times, the time of last call is only kept.

Parameters
[in]timerhandle to the timer
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 146 of file timer.c.

Referenced by ABT_timer_get_overhead().

int ABT_timer_stop ( ABT_timer  timer)

Stop the timer.

ABT_timer_stop() stops the timer and saves the time when this routine is called. When this routine is called multiple times, the time of last call is only kept.

Parameters
[in]timerhandle to the timer
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 174 of file timer.c.

Referenced by ABT_timer_get_overhead().

int ABT_timer_stop_and_add ( ABT_timer  timer,
double *  secs 
)

Stop the timer and add the elapsed time of the timer.

ABT_timer_stop_and_add() stops the timer and adds the time difference between the start time of timer (when ABT_timer_start() was called) and the end time of timer (when this routine was called) to secs. That is, the elapsed time of the timer is accumulated in secs. The resolution of elapsed time is at least a unit of microsecond.

Parameters
[in]timerhandle to the timer
[in,out]secsaccumulated elapsed time in seconds
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 277 of file timer.c.

int ABT_timer_stop_and_read ( ABT_timer  timer,
double *  secs 
)

Stop the timer and read the elapsed time of the timer.

ABT_timer_stop_and_read() stops the timer and returns the time difference in seconds between the start time of timer (when ABT_timer_start() was called) and the end time of timer (when this routine was called) through secs. The resolution of elapsed time is at least a unit of microsecond.

Parameters
[in]timerhandle to the timer
[out]secselapsed time in seconds
Returns
Error code
Return values
ABT_SUCCESSon success

Definition at line 240 of file timer.c.