improved documentation of the code
This commit is contained in:
parent
a2f673ccaf
commit
c65dc30fc2
1 changed files with 8 additions and 5 deletions
|
@ -45,8 +45,6 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
Timer::TimerList Timer::m_timerlist;
|
Timer::TimerList Timer::m_timerlist;
|
||||||
|
@ -125,6 +123,8 @@ void Timer::updateTimers(int fd) {
|
||||||
|
|
||||||
bool overdue = false;
|
bool overdue = false;
|
||||||
|
|
||||||
|
// see, if the first timer in the
|
||||||
|
// list is overdue
|
||||||
if (!m_timerlist.empty()) {
|
if (!m_timerlist.empty()) {
|
||||||
gettimeofday(&now, 0);
|
gettimeofday(&now, 0);
|
||||||
|
|
||||||
|
@ -155,8 +155,11 @@ void Timer::updateTimers(int fd) {
|
||||||
timeout = &tm;
|
timeout = &tm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if not overdue, wait for the next xevent via the blocking
|
||||||
|
// select(), so OS sends fluxbox to sleep. the select() will
|
||||||
|
// time out when the next timer has to be handled
|
||||||
if (!overdue && select(fd + 1, &rfds, 0, 0, timeout) != 0)
|
if (!overdue && select(fd + 1, &rfds, 0, 0, timeout) != 0)
|
||||||
// didn't time out! x events pending
|
// didn't time out! x events are pending
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TimerList::iterator it;
|
TimerList::iterator it;
|
||||||
|
|
Loading…
Reference in a new issue