30 # include <itpp/config.h>
32 # include <itpp/config_msvc.h>
35 #ifdef TIME_WITH_SYS_TIME
36 # include <sys/time.h>
39 # ifdef HAVE_SYS_TIME_H
40 # include <sys/time.h>
52 #if defined(_WIN32) && !defined(__CYGWIN__)
55 int gettimeofday(
struct timeval* p,
void*)
62 GetSystemTimeAsFileTime(&(_now.ft));
63 p->tv_usec = (long)((_now.ns100 / 10LL) % 1000000LL);
65 p->tv_sec = (long)((_now.ns100 - 116444736000000000LL) / 10000000LL);
132 std::cout <<
"Elapsed time = " <<
get_time() <<
" seconds" << std::endl;
140 return static_cast<double>(clock()) / CLOCKS_PER_SEC;
150 return t.tv_sec + t.tv_usec * 1.0e-6;
172 std::cout <<
"(Press enter to continue)" << std::endl;