41 #if defined(ARMA_USE_BOOST_DATE) 43 boost_time1 = boost::posix_time::microsec_clock::local_time();
47 #if defined(ARMA_HAVE_GETTIMEOFDAY) 49 gettimeofday(&posix_time1, 0);
54 arma_stop(
"wall_clock::tic(): need Boost libraries or POSIX gettimeofday()");
70 #if defined(ARMA_USE_BOOST_DATE) 72 boost_duration = boost::posix_time::microsec_clock::local_time() - boost_time1;
73 return boost_duration.total_microseconds() * 1e-6;
76 #if defined(ARMA_HAVE_GETTIMEOFDAY) 78 gettimeofday(&posix_time2, 0);
80 const double tmp_time1 = posix_time1.tv_sec + posix_time1.tv_usec * 1.0e-6;
81 const double tmp_time2 = posix_time2.tv_sec + posix_time2.tv_usec * 1.0e-6;
83 return tmp_time2 - tmp_time1;
87 arma_stop(
"wall_clock::toc(): need Boost libraries or POSIX gettimeofday()");
void arma_cold arma_stop(const T1 &x)
print a message to get_stream_err1() and/or throw a logic_error exception
void tic()
start the timer
#define arma_extra_debug_sigprint
double toc()
return the number of seconds since the last call to tic()