mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 03:19:02 +08:00
snprinf for msc ver
This commit is contained in:
@@ -58,7 +58,7 @@ public:
|
||||
// If the queue is full, block the calling thread until there is room.
|
||||
template<typename TT>
|
||||
void push(TT&& item) {
|
||||
constexpr std::chrono::hours one_hour(1);
|
||||
constexpr std::chrono::hours one_hour(1);
|
||||
while (!push(std::forward<TT>(item), one_hour));
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
// Pop a copy of the front item in the queue into the given item ref.
|
||||
// If the queue is empty, block the calling thread util there is item to pop.
|
||||
void pop(T& item) {
|
||||
constexpr std::chrono::hours one_hour(1);
|
||||
constexpr std::chrono::hours one_hour(1);
|
||||
while (!pop(item, one_hour));
|
||||
}
|
||||
|
||||
|
@@ -31,3 +31,8 @@ inline std::tm c11log::details::os::localtime()
|
||||
std::time_t now_t = time(0);
|
||||
return localtime(now_t);
|
||||
}
|
||||
|
||||
// Take care of snprintf in visual studio
|
||||
#ifdef _MSC_VER
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user