From ae748166d06e756a0a6abab582dc341494a9b2da Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sun, 17 Mar 2019 11:05:53 +0100 Subject: Codechange: Use platform independent C++11 function for sleeping on a thread. --- src/os/os2/os2.cpp | 9 --------- src/os/unix/unix.cpp | 8 -------- src/os/windows/win32.cpp | 6 ------ 3 files changed, 23 deletions(-) (limited to 'src/os') diff --git a/src/os/os2/os2.cpp b/src/os/os2/os2.cpp index 9d01a99b8..b62e83e5e 100644 --- a/src/os/os2/os2.cpp +++ b/src/os/os2/os2.cpp @@ -205,15 +205,6 @@ bool GetClipboardContents(char *buffer, const char *last) } -void CSleep(int milliseconds) -{ -#ifndef __INNOTEK_LIBC__ - delay(milliseconds); -#else - usleep(milliseconds * 1000); -#endif -} - const char *FS2OTTD(const char *name) {return name;} const char *OTTD2FS(const char *name) {return name;} diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp index 024dc8627..e20a6c1b5 100644 --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -273,14 +273,6 @@ bool GetClipboardContents(char *buffer, const char *last) #endif -/* multi os compatible sleep function */ - -void CSleep(int milliseconds) -{ - usleep(milliseconds * 1000); -} - - #ifndef __APPLE__ uint GetCPUCoreCount() { diff --git a/src/os/windows/win32.cpp b/src/os/windows/win32.cpp index 2a72ca1c5..9847de567 100644 --- a/src/os/windows/win32.cpp +++ b/src/os/windows/win32.cpp @@ -544,12 +544,6 @@ bool GetClipboardContents(char *buffer, const char *last) } -void CSleep(int milliseconds) -{ - Sleep(milliseconds); -} - - /** * Convert to OpenTTD's encoding from that of the local environment. * When the project is built in UNICODE, the system codepage is irrelevant and -- cgit v1.2.3-54-g00ecf