August 5, 2011 0

timing in C++

By in C++

when wanting high precision timing in C++ on linux use time.h and do

timespec timestamp;

clock_timeofday(CLOCK_REALTIME,&timestamp);

It is unknown where CLOCK_REALTIME is defined but the computer didn’t seem to complain.

And remember to link agains librt.so

 

 

Tags:


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/mgis.dk/about/wp-includes/class-wp-comment-query.php on line 399

Leave a Reply