mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-13 01:20:22 +03:00
Fixed build issue with Mac OSX, which don't support std::chrono::monotonic_clock.
This commit is contained in:
parent
c939dec26a
commit
5f644b1b04
6
Log.cpp
6
Log.cpp
@ -24,8 +24,12 @@ void LogMsg::Process()
|
||||
|
||||
const std::string& Log::GetTimestamp ()
|
||||
{
|
||||
#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 6)
|
||||
#if !defined(__APPLE__)
|
||||
#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 6) && !defined(__APPLE__)
|
||||
auto ts = std::chrono::monotonic_clock::now ();
|
||||
#else
|
||||
auto ts = std::chrono::steady_clock::now ();
|
||||
#endif
|
||||
#else
|
||||
auto ts = std::chrono::steady_clock::now ();
|
||||
#endif
|
||||
|
4
Log.h
4
Log.h
@ -50,11 +50,15 @@ class Log: public i2p::util::MsgQueue<LogMsg>
|
||||
|
||||
std::ostream * m_LogStream;
|
||||
std::string m_Timestamp;
|
||||
#if !defined(__APPLE__)
|
||||
#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 6) // gcc 4.6
|
||||
std::chrono::monotonic_clock::time_point m_LastTimestampUpdate;
|
||||
#else
|
||||
std::chrono::steady_clock::time_point m_LastTimestampUpdate;
|
||||
#endif
|
||||
#else
|
||||
std::chrono::steady_clock::time_point m_LastTimestampUpdate;
|
||||
#endif
|
||||
};
|
||||
|
||||
extern Log * g_Log;
|
||||
|
Loading…
Reference in New Issue
Block a user