Codechange: Use platform independent C++11 function for sleeping on a thread.
This commit is contained in:
@@ -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;}
|
||||
|
||||
|
@@ -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()
|
||||
{
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user