From 54b0123eab05295c4f510692bef48c0ac7618607 Mon Sep 17 00:00:00 2001 From: Fabien Costantini Date: Wed, 21 May 2014 04:10:12 +0000 Subject: 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 --- FL/Fl.H | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'FL') diff --git a/FL/Fl.H b/FL/Fl.H index c8f579315..148bca0ee 100644 --- a/FL/Fl.H +++ b/FL/Fl.H @@ -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. -- cgit v1.2.3