Definition in file eg_timer.h.
#include <stdlib.h>
#include <stdio.h>
#include "eg_config.h"
#include <sys/resource.h>
#include <sys/time.h>
#include <unistd.h>
#include <time.h>
#include <errno.h>
#include "eg_macros.h"
Include dependency graph for eg_timer.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
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. |