mirror of
https://github.com/monero-project/monero.git
synced 2025-05-06 15:05:01 -04:00
blockchain_stats: don't use gmtime_r on Windows
In some cases, it doesn't like it (I don't know the details). Factor into a new epee function
This commit is contained in:
parent
84dd674cd0
commit
96e6b43970
4 changed files with 13 additions and 12 deletions
|
@ -122,6 +122,15 @@ namespace misc_utils
|
|||
return boost::lexical_cast<std::string>(GetCurrentThreadId());
|
||||
#elif defined(__GNUC__)
|
||||
return boost::lexical_cast<std::string>(pthread_self());
|
||||
#endif
|
||||
}
|
||||
|
||||
inline bool get_gmt_time(time_t t, struct tm &tm)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return gmtime_s(&tm, &t);
|
||||
#else
|
||||
return gmtime_r(&t, &tm);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue