ATLAS Offline Software
Macros | Functions
RegSelTimer.h File Reference
#include <time.h>
#include <sys/time.h>
Include dependency graph for RegSelTimer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GTT_TIMER_START   0
 
#define GTT_TIMER_STOP   1
 
#define GTT_TIMER_SINCE   -1
 

Functions

double gtttimer (int)
 
void gtttimer_initkey (void)
 
struct timeval gtttimer_start (void)
 significantly (0.02ms) faster and simpler timer start/stop functions More...
 
double gtttimer_stop (struct timeval)
 

Macro Definition Documentation

◆ GTT_TIMER_SINCE

#define GTT_TIMER_SINCE   -1

Definition at line 32 of file RegSelTimer.h.

◆ GTT_TIMER_START

#define GTT_TIMER_START   0

Definition at line 30 of file RegSelTimer.h.

◆ GTT_TIMER_STOP

#define GTT_TIMER_STOP   1

Definition at line 31 of file RegSelTimer.h.

Function Documentation

◆ gtttimer()

double gtttimer ( int  )

◆ gtttimer_initkey()

void gtttimer_initkey ( void  )

◆ gtttimer_start()

struct timeval gtttimer_start ( void  )

significantly (0.02ms) faster and simpler timer start/stop functions

Definition at line 70 of file RegSelTimer.cxx.

119 {
120  struct timeval start_time;
121  __gtt_gettime (&start_time);
122  return start_time;
123 }

◆ gtttimer_stop()

double gtttimer_stop ( struct timeval  )

Definition at line 128 of file RegSelTimer.cxx.

129 {
130  double time = 0;
131  struct timeval stop_time;
132  struct timeval diff_time;
133  // double diff;
134 
135  __gtt_gettime (&stop_time);
136  // pthread_mutex_lock(&time_lock);
137  _timersub( &stop_time, &start_time, &diff_time );
138  // printf("diff: %d\n", _timersub( &stop_time, &start_time, &diff_time ) );
139  // diff = gttd(stop_time)-gttd(start_time);
140  // printf("timer: %12.5f %12.5f %12.5f %12.5f\n", gttd(stop_time), gttd(start_time), gttd(diff_time), diff );
141  // pthread_mutex_unlock(&time_lock);
142  time = (diff_time.tv_sec*1000.0) + (diff_time.tv_usec/1000.0);
143  return time;
144 }
_timersub
#define _timersub
Definition: RegSelTimer.cxx:40
__gtt_gettime
void __gtt_gettime(struct timeval *t)
initialiser
Definition: RegSelTimer.cxx:70
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242