
I got strange results with boost::progress_timer - it shows timings like 1.45s whereas it took about 15 sec. to complete a routine. It used to work ok, but I have no idea why it just doesn't work anymore! I use freebsd 4.11 and clocks_per_sec is defined 128. sysconf(_SC_CLK_TCK) also returns 128, but clock counter is not correct completely. I wrote simple test class, to see what's wrong: struct Timer { clock_t t; time_t tt; Timer() : t(clock()), tt(time(0)){} ~Timer(){ std::cout << "Elapsed interval: " << (static_cast<double>(clock() -t))/CLOCKS_PER_SEC << "s " << (time(0)-tt) << "s\n" ; } }; this is the output: Elapsed interval: 1.52344s 33s 1.52 s <- output by boost::progress_timer. so, you may see that measured time is completely wrong. I rewrote it with microtime(...) and it works correctly now. any ideas what's wrong, why clock() doesn't work anymore? Wouldn't that be a good idea to use microtime for unices? thanks