26#define CLOCK_ID CLOCK_REALTIME
33#if defined(POSIX_TIME)
37#define TIME_CALL(x) clock_gettime(CLOCK_ID, x)
41 x.tv_sec = (long)(ti);
42 x.tv_nsec = (long)((ti -
x.tv_sec) * 1.0e9);
47 return (
double)
x.tv_sec + 1.0e-9 *
x.tv_nsec;
63 x.millitm = (
unsigned short)((ti -
x.time) * 1.0e6f);
68 return x.time + 1e-6 *
x.millitm;
73#define TIME_CALL(x) gettimeofday(x, NULL)
77 x.tv_sec = (long)(ti);
78 x.tv_usec = (long)((ti -
x.tv_sec) * 1.0e6);
83 return x.tv_sec + 1e-6 *
x.tv_usec;
89#ifndef CREATE_TIMEBASE_PROG
95 coTimer::mark(text); \
97#define MARK1(mask, d1) \
99 sprintf(coTimer::mark(), mask, (d1)); \
101#define MARK2(mask, d1, d2) \
103 sprintf(coTimer::mark(), mask, (d1), (d2)); \
105#define MARK3(mask, d1, d2, d3) \
107 sprintf(coTimer::mark(), mask, (d1), (d2), (d3)); \
110#define MARK4(mask, d1, d2, d3, d4) \
112 sprintf(coTimer::mark(), mask, (d1), (d2), (d3), (d4)); \
115#define MARK5(mask, d1, d2, d3, d4, d5) \
117 sprintf(coTimer::mark(), mask, (d1), (d2), (d3), (d4), (d5)); \
120#define MARK6(mask, d1, d2, d3, d4, d5, d6) \
122 sprintf(coTimer::mark(), mask, (d1), (d2), (d3), (d4), (d5), (d6)); \
140 static char s_buffer[MAX_LEN];
142 virtual void sigHandler(
int sigNo);
149 coTimer(
const char *fileNameBase,
int length,
bool handleSignals);
154 if (actElem >= maxElem)
159 return descField + MAX_LEN * actElem;
168 if (actElem >= maxElem)
173 strcpy(descField + MAX_LEN * actElem,
string);
176 void mark(
const char *)
186 static void init(
const char *fileNameBase,
int length,
bool handleSignals =
true);
199 static void mark(
const char *
string)
#define UTILEXPORT
Definition: coExport.h:206
#define TIME_CALL(x)
Definition: coTimer.h:73
GLuint res
Definition: khronos-glext.h:10588
GLenum GLuint GLenum GLsizei length
Definition: khronos-glext.h:6279
GLint GLint GLint GLint GLint x
Definition: khronos-glext.h:6346
static Repl dummy("", "")
list of all chemical elements
Definition: coConfig.h:27
double coTimerGetFloat(const TimeType &x)
Definition: coTimer.h:81
struct timeval TimeType
Definition: coTimer.h:72
void TIME_SET(TimeType &x, double ti)
Definition: coTimer.h:75
Definition: coSignal.h:103
Definition: coTimer.h:127
static void mark(const char *string)
Definition: coTimer.h:199
char * int_mark()
Definition: coTimer.h:151
std::ofstream * stream
Definition: coTimer.h:137
virtual const char * sigHandlerName()
Definition: coTimer.h:143
static coTimer * s_timerObj
we create the getTimeBase program in here, too
Definition: coTimer.h:139
void int_mark(const char *string)
Definition: coTimer.h:166
char * descField
Definition: coTimer.h:135
TimeType * actTval
Definition: coTimer.h:136
int actElem
Definition: coTimer.h:134
static char * mark()
Definition: coTimer.h:189