Code_Saturne
CFD tool
Functions
ecs_timer.h File Reference
#include "ecs_def.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

BEGIN_C_DECLS double ecs_timer_wtime (void)
 Return Wall clock time. More...
 
double ecs_timer_cpu_time (void)
 Return CPU time. More...
 
void ecs_timer_cpu_times (double *user_time, double *system_time)
 Return separate user and system CPU times. More...
 

Function Documentation

◆ ecs_timer_cpu_time()

double ecs_timer_cpu_time ( void  )

Return CPU time.

Note that in the rare case that only the minimal C library clock() method is available (see ecs_timer_cpu_time_method()), at least one of the ecs_timer_...() functions (possibly this one) must be called upon program start for this function to be used. In addition, in this case, time may "loop" back to 0 every multiple of 2^size_t / CLOCKS_PER_SEC seconds.

Returns
current CPU time usage, or -1 if unable to compute.

◆ ecs_timer_cpu_times()

void ecs_timer_cpu_times ( double *  user_time,
double *  system_time 
)

Return separate user and system CPU times.

Note that in the rare case that only the minimal C library clock() method is available, this function will return -1 values.

Parameters
[out]user_timecurrent user CPU usage.
[out]system_timecurrent system CPU usage.

◆ ecs_timer_wtime()

BEGIN_C_DECLS double ecs_timer_wtime ( void  )

Return Wall clock time.

Returns
elapsed time from first call of a function of the ecs_timer_...() series, or -1 if unable to compute.