Mercurial > hg > orthanc
comparison Core/Toolbox.cpp @ 2242:4e8e0ad2001c
move USleep() in SystemToolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 19 Dec 2016 15:31:01 +0100 |
parents | 1c42860097fc |
children | a3a65de1840f |
comparison
equal
deleted
inserted
replaced
2241:eb363ec95d86 | 2242:4e8e0ad2001c |
---|---|
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 |