Files | |
| file | eg_timer.h |
Data Structures | |
| struct | EGtimer_t |
| this structure holds a timer structure More... | |
Defines | |
| #define | __EGzeit() |
| Get system time. | |
| #define | EGtimerReset(timer) ({(timer)->time = 0;}) |
| this function reset the accumulated time to zero | |
| #define | EGtimerStart(timer) ({(timer)->stime = __EGzeit();}) |
| Set a new starting time for the timer. | |
| #define | EGtimerStop(timer) ({(timer)->time += __EGzeit() - (timer)->stime;}) |
| Stop a 'running' timer and accumulate the run time. | |
| #define | EGwallClockTimer_t EGtimer_t |
| This is done for backward compability, we used to define EGwallClockTimer_t just as the normal timer, so in reality we don't need another type, but keep the name so that older code depending on this still compiles. | |
| #define | EGwallClockTimerReset(timer) EGtimerReset(timer) |
| Reset the accumulated time to zero. | |
| #define | EGwallClockTimerStart(timer) ({(timer)->stime = time(0);}) |
| Set the starting time the current (wall) time. | |
| #define | EGwallClockTimerStop(timer) |
| Stop a 'running' timer and accumulate the (wall) runing time. | |
|
|
Value: ({\
struct rusage __EGzeit_ru;\
int __EGzeit_st = getrusage(RUSAGE_SELF,&__EGzeit_ru);\
EXIT(__EGzeit_st,"getrusage failed with code error %d (%s)", errno, \
strerror(errno));\
(((double)__EGzeit_ru.ru_utime.tv_sec) + \
((double)__EGzeit_ru.ru_utime.tv_usec)/1000000);})
This function is for internal purposes only and should not be called from the user space, it ask the (user) time from the system.
Definition at line 89 of file eg_timer.h. |
|
|
this function reset the accumulated time to zero
Definition at line 110 of file eg_timer.h. |
|
|
Set a new starting time for the timer.
Definition at line 101 of file eg_timer.h. |
|
|
Stop a 'running' timer and accumulate the run time.
Definition at line 106 of file eg_timer.h. |
|
|
This is done for backward compability, we used to define EGwallClockTimer_t just as the normal timer, so in reality we don't need another type, but keep the name so that older code depending on this still compiles.
Definition at line 81 of file eg_timer.h. |
|
|
Reset the accumulated time to zero.
Definition at line 125 of file eg_timer.h. |
|
|
Set the starting time the current (wall) time.
Definition at line 115 of file eg_timer.h. |
|
|
Value: ({\
(timer)->time += difftime(time(0),(timer)->stime);})
Definition at line 120 of file eg_timer.h. |
1.4.5