summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2019-03-17 11:05:53 +0100
committerMichael Lutz <michi@icosahedron.de>2019-04-06 11:27:39 +0200
commitae748166d06e756a0a6abab582dc341494a9b2da (patch)
treed4c75246740f2e2ddd6978a6b14b17ac84bc27cf /src/os
parent94c5269fa772304112b7c40d2c84794056f87717 (diff)
downloadopenttd-ae748166d06e756a0a6abab582dc341494a9b2da.tar.xz
Codechange: Use platform independent C++11 function for sleeping on a thread.
Diffstat (limited to 'src/os')
-rw-r--r--src/os/os2/os2.cpp9
-rw-r--r--src/os/unix/unix.cpp8
-rw-r--r--src/os/windows/win32.cpp6
3 files changed, 0 insertions, 23 deletions
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