summaryrefslogtreecommitdiff
path: root/lib/common/Timer.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-09-04 01:36:13 +0000
committerChris Wilson <chris+github@qwirx.com>2014-09-04 01:36:13 +0000
commita134f6eca8102400f41ae0a1e2e9ab3236b1649b (patch)
tree614ed773d8a00bc8d6c1c4a7c296877adfd878a2 /lib/common/Timer.h
parent426a506afd1ffb3bd67e61b4693ee9bb968097a1 (diff)
Backport Timers::Cleanup that's safe to use in test cleanup.
Allows it not to throw an exception if timers weren't initialised when cleanup was requested. Normally we want an exception thrown, but not while we're cleaning up a test that might have failed with timers uninitialised. More timers fixes after cleanup no-exception option. Merged back changes from the test refactor branch to reduce diffs.
Diffstat (limited to 'lib/common/Timer.h')
-rw-r--r--lib/common/Timer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common/Timer.h b/lib/common/Timer.h
index 09be58fa..68592aaa 100644
--- a/lib/common/Timer.h
+++ b/lib/common/Timer.h
@@ -43,7 +43,8 @@ class Timers
public:
static void Init();
- static void Cleanup();
+ static void Cleanup(bool throw_exception_if_not_initialised = true);
+ static void AssertInitialised();
static void Add (Timer& rTimer);
static void Remove(Timer& rTimer);
static void RequestReschedule();