diff options
author | Howard Chu <hyc@symas.com> | 2016-03-11 14:11:01 +0000 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-03-11 15:46:09 +0000 |
commit | 52056dcfc480a126e06afaf209b1772b6aa77fb3 (patch) | |
tree | fd45abcd3f35ad2b74567e53896ac79eafdf7ec8 /contrib/epee | |
parent | WIN32: Need getpid() declaration (diff) | |
download | monero-52056dcfc480a126e06afaf209b1772b6aa77fb3.tar.xz |
WIN32 thread_id is OS-dependent not compiler-dependent
Diffstat (limited to '')
-rw-r--r-- | contrib/epee/include/misc_os_dependent.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/contrib/epee/include/misc_os_dependent.h b/contrib/epee/include/misc_os_dependent.h index 4d9c991e4..2abca0446 100644 --- a/contrib/epee/include/misc_os_dependent.h +++ b/contrib/epee/include/misc_os_dependent.h @@ -52,6 +52,12 @@ namespace misc_utils { #if defined(_MSC_VER) return ::GetTickCount64(); +#elif defined(WIN32) +# if defined(WIN64) + return GetTickCount64(); +# else + return GetTickCount(); +# endif #elif defined(__MACH__) clock_serv_t cclock; mach_timespec_t mts; @@ -98,7 +104,7 @@ namespace misc_utils inline std::string get_thread_string_id() { -#if defined(_MSC_VER) +#if defined(_WIN32) return boost::lexical_cast<std::string>(GetCurrentThreadId()); #elif defined(__GNUC__) return boost::lexical_cast<std::string>(pthread_self()); |