Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many times a MythTimer is constructed and start() is called immediately afterward. This adds a parameter to the constructor StartState, so instead of: MythTimer t; t.start(); do_something(); int e = t.elapsed(); you can write: MythTimer t(MythTimer::StartRunning); do_something(); int e = t.elapsed(); This also reverts [9402858], which made starting the timer running the default. The bug requiring that hack was fixed in [926464a]. This also allows you to define DEBUG_TIMER_API_USAGE and have MythTimer assert that the timer is running when elapsed is called to catch timer API misuse.
- Loading branch information
1 parent
309c97e
commit 58584fa
Showing
4 changed files
with
39 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters