summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2014-10-30 16:05:22 +0000
committerAlbrecht Schlosser <albrechts.fltk@online.de>2014-10-30 16:05:22 +0000
commit3e1da3012a2e722b3bf13217d2013a4895892a68 (patch)
tree8b869e4bf3a64ae8d22177cc5894df440484ce6c /src
parent5772a1987c7c0a29b391ffc3dbd40d698ffe1c55 (diff)
Remove Fl::*sleep() method family, as discussed in fltk.coredev.
Hopefully this doesn't break Windows or Mac OX IDE builds, please help testing. Short story: these functions showed compatibility problems, lacked some quality (regarding interruption by signals), and maybe more. This is a combined commit that reverts three (3) svn commits. The following lists are extracted from git, but show the svn revisions and files: Remove Fl::*sleep() family, part 1: revert svn r 10287. :100644 100644 a988702... 794920f... M ide/Xcode4/FLTK.xcodeproj/project.pbxproj Remove Fl::*sleep() family, part 2: revert svn r 10151. :100644 100644 cf839e6... bfde9c4... M ide/Xcode3/FLTK.xcodeproj/project.pbxproj :100644 100644 794920f... c0c772a... M ide/Xcode4/FLTK.xcodeproj/project.pbxproj Remove Fl::*sleep() family, part 2b: revert svn r 10151 (continued). :100644 100644 bfde9c4... abf2922... M ide/Xcode3/FLTK.xcodeproj/project.pbxproj Remove Fl::*sleep() family, part 3: revert svn r 10150. :100644 100644 b469018... e76a3e5... M FL/Fl.H :100644 100644 7bb7899... 4d4755d... M ide/VisualC2008/fltk.lib.vcproj :100644 100644 9d9a2cf... 334aef8... M ide/VisualC2008/fltkdll.vcproj :100644 100644 5533a54... e30058b... M ide/VisualC2010/fltk.lib.vcxproj :100644 100644 e49f691... 1259c87... M ide/VisualC2010/fltk.lib.vcxproj.filters :100644 100644 946f31a... d53ab80... M src/CMakeLists.txt :100644 000000 fed36fd... 0000000... D src/Fl_sleep.cxx :100644 100644 3d9656c... 3b265f9... M src/Makefile :100644 100644 6eadbcb... 5dd5872... M test/sudoku.cxx git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10419 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/Fl_sleep.cxx68
-rw-r--r--src/Makefile3
3 files changed, 1 insertions, 71 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 946f31ad2..d53ab8001 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -94,7 +94,6 @@ set(CPPFILES
Fl_get_system_colors.cxx
Fl_grab.cxx
Fl_lock.cxx
- Fl_sleep.cxx
Fl_own_colormap.cxx
Fl_visual.cxx
Fl_x.cxx
diff --git a/src/Fl_sleep.cxx b/src/Fl_sleep.cxx
deleted file mode 100644
index fed36fdcc..000000000
--- a/src/Fl_sleep.cxx
+++ /dev/null
@@ -1,68 +0,0 @@
-//
-// "$Id$"
-//
-// Multi-platform sleep functions for the Fast Light Tool Kit (FLTK).
-//
-// 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
-// file is missing or damaged, see the license at:
-//
-// http://www.fltk.org/COPYING.php
-//
-// Please report all bugs and problems on the following page:
-//
-// http://www.fltk.org/str.php
-//
-
-// Cross platform sleep API for FLTK, F. Costantini, May 20th, 2014
-
-#include <FL/Fl.H>
-#include <config.h>
-
-#include <stdlib.h>
-
-#ifdef WIN32
-#include <windows.h>
-#else
-#include <unistd.h>
-#endif
-
-/** Make the current thread sleep for n seconds, support decimals ... */
-void Fl::sleep(double seconds)
-{
- Fl::usleep((unsigned long long) (seconds*1000000));
-}
-
-/** Make the current thread to sleep for n milliseconds */
-void Fl::msleep(unsigned long milliseconds)
-{
-#ifdef WIN32
- ::Sleep( (DWORD) milliseconds);
-#else
- ::usleep((useconds_t) (milliseconds*1000));
-#endif
-}
-
-/** Make the current thread to sleep for n 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;
-
- 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);
-#else
- ::usleep((useconds_t) microseconds);
-#endif
-}
-
-//
-// End of "$Id$".
-//
diff --git a/src/Makefile b/src/Makefile
index 3d9656c8e..3b265f9fa 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -61,7 +61,7 @@ CPPFILES = \
Fl_Pack.cxx \
Fl_Paged_Device.cxx \
Fl_Pixmap.cxx \
- Fl_PostScript.cxx \
+ Fl_PostScript.cxx \
Fl_Positioner.cxx \
Fl_Preferences.cxx \
Fl_Printer.cxx \
@@ -110,7 +110,6 @@ CPPFILES = \
Fl_get_system_colors.cxx \
Fl_grab.cxx \
Fl_lock.cxx \
- Fl_sleep.cxx \
Fl_own_colormap.cxx \
Fl_visual.cxx \
Fl_x.cxx \