38 #ifdef GECODE_USE_GETTIMEOFDAY
42 #ifdef GECODE_USE_CLOCK
46 namespace Gecode {
namespace Support {
57 #if defined(GECODE_USE_GETTIMEOFDAY)
59 #elif defined(GECODE_USE_CLOCK)
71 #if defined(GECODE_USE_GETTIMEOFDAY)
72 if (gettimeofday(&t0, NULL))
74 #elif defined(GECODE_USE_CLOCK)
81 #if defined(GECODE_USE_GETTIMEOFDAY)
83 if (gettimeofday(&t1, NULL))
87 t.tv_sec = t1.tv_sec - t0.tv_sec;
88 t.tv_usec = t1.tv_usec - t0.tv_usec;
94 return (static_cast<double>(t.tv_sec) * 1000.0) +
95 (
static_cast<double>(t.tv_usec)/1000.0);
96 #elif defined(GECODE_USE_CLOCK)
97 return (static_cast<double>(clock()-t0) / CLOCKS_PER_SEC) * 1000.0;
void stop(Support::Timer &timer, std::ostream &os)
Get time since start of timer and print user friendly time information.
void start(void)
Start timer.
Exception: operating system error
#define GECODE_SUPPORT_EXPORT
double stop(void)
Get time since start of timer.
Gecode toplevel namespace