diff options
Diffstat (limited to 'src/FbTk/Timer.cc')
-rw-r--r-- | src/FbTk/Timer.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/FbTk/Timer.cc b/src/FbTk/Timer.cc index 1bec893..422e9c6 100644 --- a/src/FbTk/Timer.cc +++ b/src/FbTk/Timer.cc | |||
@@ -58,8 +58,12 @@ | |||
58 | namespace { | 58 | namespace { |
59 | 59 | ||
60 | struct TimerCompare { | 60 | struct TimerCompare { |
61 | bool operator() (const FbTk::Timer* a, const FbTk::Timer* b) { | 61 | // stable sort order and allows multiple timers to have |
62 | return a->getEndTime() < b->getEndTime(); | 62 | // the same end-time |
63 | bool operator() (const FbTk::Timer* a, const FbTk::Timer* b) const { | ||
64 | uint64_t ae = a->getEndTime(); | ||
65 | uint64_t be = b->getEndTime(); | ||
66 | return (ae < be) || (ae == be && a < b); | ||
63 | } | 67 | } |
64 | }; | 68 | }; |
65 | typedef std::set<FbTk::Timer*, TimerCompare> TimerList; | 69 | typedef std::set<FbTk::Timer*, TimerCompare> TimerList; |