]> Dogcows Code - chaz/yoink/blobdiff - src/moof/runloop.hh
remove some unused stlplus modules
[chaz/yoink] / src / moof / runloop.hh
index 29529521e8d16c96a35c4472fbe603e93396e8ce..6d56d83dcb60662a7a2fd0bb0367d5c24806ad32 100644 (file)
@@ -1,13 +1,11 @@
 
-/*]  Copyright (c) 2009-2010, Charles McGarvey  [**************************
+/*]  Copyright (c) 2009-2011, Charles McGarvey  [*****************************
 **]  All rights reserved.
 *
-* vi:ts=4 sw=4 tw=75
-*
 * Distributable under the terms and conditions of the 2-clause BSD license;
 * see the file COPYING for a complete text of the license.
 *
-**************************************************************************/
+*****************************************************************************/
 
 #ifndef _MOOF_RUNLOOP_HH_
 #define _MOOF_RUNLOOP_HH_
@@ -29,7 +27,6 @@ namespace moof {
 
 // forward declarations
 class timer;
-       
 
 /**
  * A runloop is a loop with scheduled timers.
@@ -51,9 +48,9 @@ public:
 
        /**
         * Do one iteration of the runloop.
+        * \return The number of tasks which were given time.
         */
-       void run_once();
-
+       int run_once();
 
        /**
         * Start running the runloop.
@@ -67,15 +64,18 @@ public:
         */
        void stop(int code = 0);
 
+       bool is_running() const
+       {
+               return !stop_;
+       }
 
        void add_timer(timer& timer);
        void remove_timer(timer& timer);
 
-
 private:
 
        bool            stop_;
-       int                     code_;
+       int             code_;
 
        typedef std::vector<timer*> timer_table;
        timer_table     timers_;
This page took 0.019456 seconds and 4 git commands to generate.