diff options
| author | Fabien Costantini <fabien@onepost.net> | 2014-05-21 04:10:12 +0000 |
|---|---|---|
| committer | Fabien Costantini <fabien@onepost.net> | 2014-05-21 04:10:12 +0000 |
| commit | 54b0123eab05295c4f510692bef48c0ac7618607 (patch) | |
| tree | bacc68bc8db89fba29363b8e8d0e8bfc57cea4ba /FL | |
| parent | 2c820fd53dad8a753721a9a4ff5d8daced7345ee (diff) | |
Added a new portable sleep API(ABI compatible). Now features a flexible multi-usage sleep() api accepting decimals, msleep() for millisecs only, usleep() for microsecs. Updated Makefiles, cmakefiles, vs2008, vs2010 with the new Fl_sleep add-on. Documented new API. still needs to be added in Xcode.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10150 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl.H | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1075,6 +1075,16 @@ public: static void awake(void* message = 0); /** See void awake(void* message=0). */ static int awake(Fl_Awake_Handler cb, void* message = 0); + + // Cross platform sleep API + + /** flexible sleep function in seconds, accepts decimals typically up to 100usec resolution (depends on your hardware) */ + static void sleep(double seconds); + /** milli seconds sleep */ + static void msleep(unsigned long milliseconds); + /** microseconds sleep */ + static void usleep(unsigned long long microseconds); + /** The thread_message() method returns the last message that was sent from a child by the awake() method. |
