Fix a comment, remove trailing white space.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser
2014-08-19 12:37:13 +00:00
parent 34a641f1ef
commit 82f157481d
+10 -10
View File
@@ -1,9 +1,9 @@
// //
// "$Id$" // "$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 // 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 // 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 */ /** 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 ... // unsigned long long more should be more portable than int64_t before c++ 2011 ...
{ {
#ifdef WIN32 #ifdef WIN32
HANDLE timer; HANDLE timer;
LARGE_INTEGER reltime; LARGE_INTEGER reltime;
reltime.QuadPart = (LONGLONG) -(10*microseconds); // Convert to 100 nanosecond relative time interval reltime.QuadPart = (LONGLONG) -(10*microseconds); // Convert to 100 nanosecond relative time interval
timer = CreateWaitableTimer(NULL, TRUE, NULL); timer = CreateWaitableTimer(NULL, TRUE, NULL);
SetWaitableTimer(timer, &reltime, 0, NULL, NULL, 0); SetWaitableTimer(timer, &reltime, 0, NULL, NULL, 0);
WaitForSingleObject(timer, INFINITE); WaitForSingleObject(timer, INFINITE);
CloseHandle(timer); CloseHandle(timer);
#else #else
::usleep((useconds_t) microseconds); ::usleep((useconds_t) microseconds);
#endif #endif