From 82f157481d3218e2a17ff2eddb1ba246944b3862 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 19 Aug 2014 12:37:13 +0000 Subject: Fix a comment, remove trailing white space. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10227 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_sleep.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') 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 -- cgit v1.2.3