Go to the source code of this file.
      
        
          | CS_TIMER_COUNTER_ADD | ( |  | _res, | 
        
          |  |  |  | _c0, | 
        
          |  |  |  | _c1 | 
        
          |  | ) |  |  | 
      
 
Value:(_res.wall_nsec = _c0.wall_nsec + _c1.wall_nsec,  \
   _res.cpu_nsec  = _c0.cpu_nsec + _c1.cpu_nsec)
Add timer counter. 
The result may be identical to one of the 2 counters to add.
- Parameters
- 
  
    | [out] | _res | resulting counter. |  | [in] | _c0 | counter to add. |  | [in] | _c1 | counter to add. |  
 
 
 
      
        
          | CS_TIMER_COUNTER_INIT | ( |  | _t | ) |  | 
      
 
Value:(_t.wall_nsec = 0,  \
   _t.cpu_nsec  = 0)
Initialize timer counter. 
- Parameters
- 
  
    | [out] | _t | resulting counter. |  
 
 
 
Add the the difference between 2 timers to a counter. 
- Parameters
- 
  
    | [in,out] | tc | pointer to timer counter |  | [in] | t0 | oldest timer value |  | [in] | t1 | most recent timer value |  
 
 
 
      
        
          | double cs_timer_cpu_time | ( | void |  | ) |  | 
      
 
Return CPU time. 
Note that in the rare case that only the minimal C library clock() method is available (see cs_timer_cpu_time_method()), at least one of the cs_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. 
 
 
      
        
          | const char* cs_timer_cpu_time_method | ( | void |  | ) |  | 
      
 
Return method used to return CPU time. 
- Returns
- short description of method used to return CPU time. 
 
 
      
        
          | void cs_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_time | current user CPU usage. |  | [out] | system_time | current system CPU usage. |  
 
 
 
Compute the difference between 2 timers. 
- Parameters
- 
  
    | [in] | t0 | oldest timer value |  | [in] | t1 | most recent timer value |  
 
- Returns
- last - first timer value. 
 
 
Return a timer's value. 
- Returns
- timer structure. 
 
 
      
        
          | double cs_timer_wtime | ( | void |  | ) |  | 
      
 
Return Wall clock time. 
- Returns
- elapsed time from first call of a function of the cs_timer_...() series, or -1 if unable to compute. 
 
 
      
        
          | const char* cs_timer_wtime_method | ( | void |  | ) |  | 
      
 
Return method used to return wall clock time. 
- Returns
- short description of method used to return wall clock time.