Mercurial > hg > orthanc-wsi
comparison Resources/Orthanc/Core/Toolbox.cpp @ 92:4b0e0f7c9957
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 23 Dec 2016 16:06:05 +0100 |
parents | 7a3853d51c45 |
children | ff0ef01c332c |
comparison
equal
deleted
inserted
replaced
91:8fd5bf76bb8e | 92:4b0e0f7c9957 |
---|---|
88 #endif | 88 #endif |
89 | 89 |
90 | 90 |
91 namespace Orthanc | 91 namespace Orthanc |
92 { | 92 { |
93 void Toolbox::USleep(uint64_t microSeconds) | |
94 { | |
95 #if defined(_WIN32) | |
96 ::Sleep(static_cast<DWORD>(microSeconds / static_cast<uint64_t>(1000))); | |
97 #elif defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(__native_client__) | |
98 usleep(microSeconds); | |
99 #else | |
100 #error Support your platform here | |
101 #endif | |
102 } | |
103 | |
104 | |
105 void Toolbox::ToUpperCase(std::string& s) | 93 void Toolbox::ToUpperCase(std::string& s) |
106 { | 94 { |
107 std::transform(s.begin(), s.end(), s.begin(), toupper); | 95 std::transform(s.begin(), s.end(), s.begin(), toupper); |
108 } | 96 } |
109 | 97 |