34 #ifdef GECODE_USE_GETTIMEOFDAY 38 #ifdef GECODE_USE_CLOCK 42 namespace Gecode {
namespace Support {
53 #if defined(GECODE_USE_GETTIMEOFDAY) 55 #elif defined(GECODE_USE_CLOCK) 67 #if defined(GECODE_USE_GETTIMEOFDAY) 68 if (gettimeofday(&t0, NULL))
70 #elif defined(GECODE_USE_CLOCK) 77 #if defined(GECODE_USE_GETTIMEOFDAY) 79 if (gettimeofday(&t1, NULL))
83 t.tv_sec = t1.tv_sec - t0.tv_sec;
84 t.tv_usec = t1.tv_usec - t0.tv_usec;
90 return (static_cast<double>(t.tv_sec) * 1000.0) +
91 (
static_cast<double>(t.tv_usec)/1000.0);
92 #elif defined(GECODE_USE_CLOCK) 93 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