summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2014-08-19 12:37:13 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2014-08-19 12:37:13 +0000
commit82f157481d3218e2a17ff2eddb1ba246944b3862 (patch)
treef472d5e0e108ec40b1b98be11a4573f4a3207278 /src
parent34a641f1ef73f19fda751886e6db7a9473381185 (diff)
Fix a comment, remove trailing white space.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_sleep.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Fl_sleep.cxx b/src/Fl_sleep.cxx
index 1548b3d0c..fed36fdcc 100644
--- a/src/Fl_sleep.cxx
+++ b/src/Fl_sleep.cxx
@@ -1,9 +1,9 @@
//
// "$Id$"
//
-// Multi-threading support code for the Fast Light Tool Kit (FLTK).
+// Multi-platform sleep functions for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2010 by Bill Spitzak and others.
+// Copyright 1998-2014 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -46,18 +46,18 @@ void Fl::msleep(unsigned long milliseconds)
}
/** Make the current thread to sleep for n microseconds */
-void Fl::usleep(unsigned long long microseconds)
+void Fl::usleep(unsigned long long microseconds)
// unsigned long long more should be more portable than int64_t before c++ 2011 ...
{
#ifdef WIN32
- HANDLE timer;
- LARGE_INTEGER reltime;
-
+ HANDLE timer;
+ LARGE_INTEGER reltime;
+
reltime.QuadPart = (LONGLONG) -(10*microseconds); // Convert to 100 nanosecond relative time interval
- timer = CreateWaitableTimer(NULL, TRUE, NULL);
- SetWaitableTimer(timer, &reltime, 0, NULL, NULL, 0);
- WaitForSingleObject(timer, INFINITE);
- CloseHandle(timer);
+ timer = CreateWaitableTimer(NULL, TRUE, NULL);
+ SetWaitableTimer(timer, &reltime, 0, NULL, NULL, 0);
+ WaitForSingleObject(timer, INFINITE);
+ CloseHandle(timer);
#else
::usleep((useconds_t) microseconds);
#endif