aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Timer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/Timer.cc')
-rw-r--r--src/FbTk/Timer.cc8
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 @@
58namespace { 58namespace {
59 59
60struct TimerCompare { 60struct 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};
65typedef std::set<FbTk::Timer*, TimerCompare> TimerList; 69typedef std::set<FbTk::Timer*, TimerCompare> TimerList;