diff options
| author | 2018-11-21 21:40:08 -0500 | |
|---|---|---|
| committer | 2018-11-21 21:40:11 -0500 | |
| commit | d6583d68f630f3bd9a5626ab0fc24f2027ddd50a (patch) | |
| tree | 5b3adda2620a1d81e31ac416a5f53573f7a6c0ac /src | |
| parent | common/thread: Remove unused CurrentThreadId() (diff) | |
| download | yuzu-d6583d68f630f3bd9a5626ab0fc24f2027ddd50a.tar.gz yuzu-d6583d68f630f3bd9a5626ab0fc24f2027ddd50a.tar.xz yuzu-d6583d68f630f3bd9a5626ab0fc24f2027ddd50a.zip | |
common/thread: Remove SleepCurrentThread()
This is also unused and superceded by standard functionality. The
standard library provides std::this_thread::sleep_for(), which provides
a much more flexible interface, as different time units can be used with
it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/thread.cpp | 11 | ||||
| -rw-r--r-- | src/common/thread.h | 1 |
2 files changed, 0 insertions, 12 deletions
diff --git a/src/common/thread.cpp b/src/common/thread.cpp index a7267b637..4bcb65236 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp | |||
| @@ -25,13 +25,6 @@ | |||
| 25 | 25 | ||
| 26 | namespace Common { | 26 | namespace Common { |
| 27 | 27 | ||
| 28 | #ifdef _WIN32 | ||
| 29 | // Supporting functions | ||
| 30 | void SleepCurrentThread(int ms) { | ||
| 31 | Sleep(ms); | ||
| 32 | } | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifdef _MSC_VER | 28 | #ifdef _MSC_VER |
| 36 | 29 | ||
| 37 | void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask) { | 30 | void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask) { |
| @@ -97,10 +90,6 @@ void SetCurrentThreadAffinity(u32 mask) { | |||
| 97 | } | 90 | } |
| 98 | 91 | ||
| 99 | #ifndef _WIN32 | 92 | #ifndef _WIN32 |
| 100 | void SleepCurrentThread(int ms) { | ||
| 101 | usleep(1000 * ms); | ||
| 102 | } | ||
| 103 | |||
| 104 | void SwitchCurrentThread() { | 93 | void SwitchCurrentThread() { |
| 105 | usleep(1000 * 1); | 94 | usleep(1000 * 1); |
| 106 | } | 95 | } |
diff --git a/src/common/thread.h b/src/common/thread.h index c20809021..5d3f39bd0 100644 --- a/src/common/thread.h +++ b/src/common/thread.h | |||
| @@ -83,7 +83,6 @@ private: | |||
| 83 | std::size_t generation; // Incremented once each time the barrier is used | 83 | std::size_t generation; // Incremented once each time the barrier is used |
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | void SleepCurrentThread(int ms); | ||
| 87 | void SwitchCurrentThread(); // On Linux, this is equal to sleep 1ms | 86 | void SwitchCurrentThread(); // On Linux, this is equal to sleep 1ms |
| 88 | void SetCurrentThreadName(const char* name); | 87 | void SetCurrentThreadName(const char* name); |
| 89 | 88 | ||