aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Timer.cc
AgeCommit message (Collapse)AuthorFilesLines
2013-01-13Minor optimization of handling the timersMathias Gumz1-15/+15
2013-01-12Fix bug: handle the list of Timers not in-placeMathias Gumz1-14/+18
With commit 541c8c4 we switched from an (manually) ordered list to a std::set<> to handle the active timers. The code which checks for overdue timers now traverses and modifies the std::set<> in place. This might lead to an infinite loop. Examples of such bad behavior are "flickering of the tooltip" (bug #3590078) or crashes (bug #3600143) or just insanely high cpu load when autoraising windows or submenus. We now make a copy of the std::set<> traverse this instead of the original.
2012-09-14minor cosmeticMathias Gumz1-4/+2
2012-09-14Fix regression: switch back to microseconds for DelayCmdMathias Gumz1-5/+5
2012-09-14Fix bug: (re)setting timeouts on a running FbTk::Timer might lead to broken ↵Mathias Gumz1-0/+9
timer list Setting a new timeout on a running FbTk::Timer must remove it from the timerlist, otherwise the list is not ordered correctly anymore. So, we stop the running FbTk::Timer, set the new timeout and restart it.
2012-08-28changed timing functions to use a monotonic increasing clockMathias Gumz1-145/+87
gettimeofday() is subject to be changed on daylight-saving or to ntp-related (think leap-seconds). even worse, it is subject to be changed BACK in time. this is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is irrelevant for timers to know the nano-seconds since the epoch anyways.
2012-01-04Pre-increment non-primitive types.Ryan Pavlik1-1/+1
Found with cppcheck: "Prefix ++/-- operators should be preferred for non-primitive types. Pre-increment/decrement can be more efficient than post-increment/decrement. Post-increment/decrement usually involves keeping a copy of the previous value around and adds a little extra code."
2011-10-31FbTk/Timer.cc: Check HAVE_SYS_SELECT_H, add alternate for windowsRyan Pavlik1-0/+2
2011-10-31FbTk/Timer.cc: Check HAVE_SYS_SELECT_HRyan Pavlik1-1/+3
2011-09-14Upgrade FbTk::Timer so it can take an arbitrary functor as a parameterPavel Labath1-2/+6
2011-09-14FbTk::Timer accepts Slots instead of Commands as the former are more generalPavel Labath1-4/+4
2011-05-10Make RefCount<> more sensiblePavel Labath1-3/+3
the previous version of operator*() made no sense. E.g., it violated the invariant (*ptr).foo <=> ptr->foo. The dereferencing operator now returns a reference to the pointed-to object, rather than a pointer to it. I also added a bool conversion operator, which can be used in testing the NULL-ness of the pointer. Anyone wondering if that could be done in a simpler way is encouraged to read <http://www.artima.com/cppsource/safebool.html>. And, finally, I removed the mutable flag from the m_data member, since it does not need it.
2010-09-09simpler to use FbTk/Timer apiMathias Gumz1-0/+5
2010-05-06compile fix: FD_ZERO (sys/select.h) on solaris wants to use memset(); closes ↵Mathias Gumz1-4/+10
#2997117
2010-01-19improved documentation of the codeMathias Gumz1-5/+8
2009-10-08reportedly fix compiling on gcc 4.4 on SolarisMark Tiefenbruck1-0/+2
2008-08-21fix parsing of Delay commandMark Tiefenbruck1-1/+2
2008-04-21some fixes for gcc 3.4Thomas Orgis1-1/+1
2008-01-11make FbTk::Command a template class, split parsing information out of ↵Mark Tiefenbruck1-7/+7
ObjectRegistry
2007-12-28moved DelayedCmd from Screen.cc to FbTk/Timer.cc, added it to the keys fileMark Tiefenbruck1-1/+37
2006-06-19fix timer issues (esp clock not updating on multiple screens)simonb1-42/+41
2006-04-18don't check the clock so often...simonb1-15/+47
2006-02-16updated copyright infomathias1-1/+1
2005-01-24copyright datemathias1-1/+1
2004-11-01accepted patch #1057446, improved iterator in timer-codeakir1-6/+15
2004-10-19if the systemtime is set back the timers wont be updated.akir1-4/+21
solution: add the delta to all of our timers too.
2004-09-19fixed a minor bug that can lead to HIGH cpuload under some circumstances.akir1-1/+2
actually we must ensure that only timers with a valid handle are added to the timerslist.
2004-08-31add autoconf check for std c++ headersrathnor1-1/+5
2003-10-05fix reading of auto raise delayrathnor1-1/+1
2003-08-11executing a command on timeout instead of calling a TimeoutHandlerfluxgen1-3/+13
2003-01-09moved from fluxbox to fbtkfluxgen1-0/+182