/home/coin/svn-release/OptimizationSuite-1.1.0/SYMPHONY/include/sym_timemeas.h File Reference
#include <sys/time.h>
#include "sym_proto.h"
Go to the source code of this file.
Defines |
#define | PRINT_TIME(tm, f) |
#define | TVCLEAR(tvp) (tvp.tv_sec = tvp.tv_usec = 0) |
#define | PTVCLEAR(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) |
#define | TVISSET(tvp) (tvp.tv_sec || tvp.tv_usec) |
#define | PTVISSET(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) |
#define | TVXLTY(xtv, ytv) |
#define | PTVXLTY(xtv, ytv) |
#define | TVXADDY(ztv, xtv, ytv) |
#define | PTVXADDY(ztv, xtv, ytv) |
#define | TVXSUBY(ztv, xtv, ytv) |
#define | PTVXSUBY(ztv, xtv, ytv) |
#define | TVTODBL(tvp) ((double)tvp.tv_sec + ((double)tvp.tv_usec)/1000000 ) |
#define | TVPTODBL(tvp) ((double)(tvp)->tv_sec+((double)(tvp)->tv_usec)/1000000) |
#define | DBLTOTV(x, tv) |
#define | DBLTOPTV(x, tvp) |
Functions |
void start_time | PROTO ((void)) |
double used_time | PROTO ((double *T)) |
Define Documentation
#define PRINT_TIME |
( |
tm, |
|
|
f |
|
) |
|
Value:{ \
double elapsed = wall_clock(NULL) - tm->start_time; \
int hours, minutes, seconds, msec; \
hours = (int)(elapsed/3600.0); \
elapsed -= hours*3600.0; \
minutes = (int)(elapsed/60.0); \
elapsed -= minutes*60.0; \
seconds = (int)elapsed; \
elapsed -= (double)seconds; \
msec = (int)(elapsed*100.0); \
fprintf(f, "%.2d:%.2d:%.2d:%.2d ", hours, minutes, seconds, msec); \
}
Definition at line 30 of file sym_timemeas.h.
#define TVCLEAR |
( |
tvp |
|
) |
(tvp.tv_sec = tvp.tv_usec = 0) |
#define PTVCLEAR |
( |
tvp |
|
) |
((tvp)->tv_sec = (tvp)->tv_usec = 0) |
#define TVISSET |
( |
tvp |
|
) |
(tvp.tv_sec || tvp.tv_usec) |
#define PTVISSET |
( |
tvp |
|
) |
((tvp)->tv_sec || (tvp)->tv_usec) |
#define TVXLTY |
( |
xtv, |
|
|
ytv |
|
) |
|
Value:( (xtv.tv_sec < ytv.tv_sec) || \
(xtv.tv_sec == ytv.tv_sec && xtv.tv_usec < ytv.tv_usec))
Definition at line 49 of file sym_timemeas.h.
#define PTVXLTY |
( |
xtv, |
|
|
ytv |
|
) |
|
Value:( ((xtv)->tv_sec < (ytv)->tv_sec) || \
((xtv)->tv_sec == (ytv)->tv_sec && (xtv)->tv_usec < (ytv)->tv_usec))
Definition at line 52 of file sym_timemeas.h.
#define TVXADDY |
( |
ztv, |
|
|
xtv, |
|
|
ytv |
|
) |
|
Value:if ((ztv.tv_usec = xtv.tv_usec + ytv.tv_usec) < 1000000) { \
ztv.tv_sec = xtv.tv_sec + ytv.tv_sec; \
} else { \
ztv.tv_usec -= 1000000; \
ztv.tv_sec = xtv.tv_sec + ytv.tv_sec + 1; \
}
Definition at line 56 of file sym_timemeas.h.
#define PTVXADDY |
( |
ztv, |
|
|
xtv, |
|
|
ytv |
|
) |
|
Value:if (((ztv)->tv_usec = (xtv)->tv_usec + (ytv)->tv_usec) < 1000000) { \
(ztv)->tv_sec = (xtv)->tv_sec + (ytv)->tv_sec; \
} else { \
(ztv)->tv_usec -= 1000000; \
(ztv)->tv_sec = (xtv)->tv_sec + (ytv)->tv_sec + 1; \
}
Definition at line 63 of file sym_timemeas.h.
#define TVXSUBY |
( |
ztv, |
|
|
xtv, |
|
|
ytv |
|
) |
|
Value:if (xtv.tv_usec >= ytv.tv_usec) { \
ztv.tv_sec = xtv.tv_sec - ytv.tv_sec; \
ztv.tv_usec = xtv.tv_usec - ytv.tv_usec; \
} else { \
ztv.tv_sec = xtv.tv_sec - ytv.tv_sec - 1; \
ztv.tv_usec = xtv.tv_usec + 1000000 - ytv.tv_usec; \
}
Definition at line 71 of file sym_timemeas.h.
#define PTVXSUBY |
( |
ztv, |
|
|
xtv, |
|
|
ytv |
|
) |
|
Value:if ((xtv)->tv_usec >= (ytv)->tv_usec) { \
(ztv)->tv_sec = (xtv)->tv_sec - (ytv)->tv_sec; \
(ztv)->tv_usec = (xtv)->tv_usec - (ytv)->tv_usec; \
} else { \
(ztv)->tv_sec = (xtv)->tv_sec - (ytv)->tv_sec - 1; \
(ztv)->tv_usec = (xtv)->tv_usec + 1000000 - (ytv)->tv_usec; \
}
Definition at line 79 of file sym_timemeas.h.
#define TVTODBL |
( |
tvp |
|
) |
((double)tvp.tv_sec + ((double)tvp.tv_usec)/1000000 ) |
#define TVPTODBL |
( |
tvp |
|
) |
((double)(tvp)->tv_sec+((double)(tvp)->tv_usec)/1000000) |
#define DBLTOTV |
( |
x, |
|
|
tv |
|
) |
|
Value:tv.tv_sec = (int) floor(x); \
tv.tv_usec = (int) floor(1000000 * (x - tv.tv_sec));
Definition at line 91 of file sym_timemeas.h.
#define DBLTOPTV |
( |
x, |
|
|
tvp |
|
) |
|
Value:(tvp)->tv_sec = (int) floor(x); \
(tvp)->tv_usec = (int) floor(1000000 * (x - (tvp)->tv_sec));
Definition at line 94 of file sym_timemeas.h.
Function Documentation
void start_time PROTO |
( |
(void) |
|
) |
|
double wall_clock PROTO |
( |
(double *T) |
|
) |
|