]> Dogcows Code - chaz/openbox/blobdiff - otk/timer.cc
80 cols
[chaz/openbox] / otk / timer.cc
index 2d36c7a05e8c476839711e5b9e3537212712568c..ceee8f2a2c57abc9488a8342c4ed3e0969e98bd8 100644 (file)
@@ -7,6 +7,17 @@
 #include "timer.hh"
 #include "display.hh"
 
+extern "C" {
+#ifdef    HAVE_SYS_SELECT_H
+#  include <sys/select.h>
+#else
+#  ifdef    HAVE_UNISTD_H
+#    include <sys/types.h>
+#    include <unistd.h>
+#  endif // HAVE_UNISTD_H
+#endif // HAVE_SYS_SELECT_H
+}
+
 namespace otk {
 
 timeval Timer::_nearest_timeout, Timer::_now;
@@ -52,8 +63,9 @@ void Timer::dispatchTimers(bool wait)
 
   while (!_q.empty()) {
     curr = _q.top();
-    /* since we overload the destructor to keep from removing from the middle of 
-       the priority queue, set _del_me, we have to do our real delete in here.
+    /* since we overload the destructor to keep from removing from the middle
+       of the priority queue, set _del_me, we have to do our real delete in
+       here.
     */
     if (curr->_del_me) {
       _q.pop();
@@ -66,9 +78,9 @@ void Timer::dispatchTimers(bool wait)
     if (!timercmp(&_now, &_nearest_timeout, >))
       break;
 
-    /* we set the last fired time to delay msec after the previous firing, then 
-       re-insert.  timers maintain their order and may trigger more than once if 
-       they've waited more than one delay's worth of time.
+    /* we set the last fired time to delay msec after the previous firing, then
+       re-insert.  timers maintain their order and may trigger more than once
+       if they've waited more than one delay's worth of time.
     */
     _q.pop();
     timevalAdd(curr->_last, curr->_delay);
This page took 0.024414 seconds and 4 git commands to generate.