-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In C++, I use a scheme of:
double tic=clock()
double timeElapsedSec=(clock()-tic)/CLOCKS_PER_SEC
to time things in seconds.
However, the timing seems to be accurate in debug mode, but it seems to be inaccurate in release mode. Possible that the -O3 optimization flag does something funky with moving these variables around.
Consider switching to a different timing method in the standard library (if one exists?) or switch to using the boost timers (think it's in the chrono library).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working