mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-23 05:37:46 +00:00
WIN32 thread_id is OS-dependent not compiler-dependent
This commit is contained in:
parent
87d39f39b3
commit
52056dcfc4
1 changed files with 7 additions and 1 deletions
|
@ -52,6 +52,12 @@ namespace misc_utils
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
return ::GetTickCount64();
|
return ::GetTickCount64();
|
||||||
|
#elif defined(WIN32)
|
||||||
|
# if defined(WIN64)
|
||||||
|
return GetTickCount64();
|
||||||
|
# else
|
||||||
|
return GetTickCount();
|
||||||
|
# endif
|
||||||
#elif defined(__MACH__)
|
#elif defined(__MACH__)
|
||||||
clock_serv_t cclock;
|
clock_serv_t cclock;
|
||||||
mach_timespec_t mts;
|
mach_timespec_t mts;
|
||||||
|
@ -98,7 +104,7 @@ namespace misc_utils
|
||||||
|
|
||||||
inline std::string get_thread_string_id()
|
inline std::string get_thread_string_id()
|
||||||
{
|
{
|
||||||
#if defined(_MSC_VER)
|
#if defined(_WIN32)
|
||||||
return boost::lexical_cast<std::string>(GetCurrentThreadId());
|
return boost::lexical_cast<std::string>(GetCurrentThreadId());
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
return boost::lexical_cast<std::string>(pthread_self());
|
return boost::lexical_cast<std::string>(pthread_self());
|
||||||
|
|
Loading…
Reference in a new issue