mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-25 06:36:37 +01:00
Added Timestamp::Min/Max which help define extreme timestamps, useful to initialize variables, especially for comparison.
Added NOMINMAX as a preprocessor define for Windows. Otherwise some Windows headers define min/max as macros which interferes with std::numeric_limits::min/max Added poco_assert_msg and poco_assert_msg_dbg, which are equivalent to poco_assert and poco_assert_dbg, respectively, but support an extra text parameter.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "Poco/Timespan.h"
|
||||
#include "Poco/Exception.h"
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
@@ -260,6 +261,8 @@ Timestamp& Timestamp::operator -= (const Timespan& span)
|
||||
return *this -= span.totalMicroseconds();
|
||||
}
|
||||
|
||||
const Timestamp::TimeVal Timestamp::Min = std::numeric_limits<Timestamp::TimeVal>::min();
|
||||
const Timestamp::TimeVal Timestamp::Max = std::numeric_limits<Timestamp::TimeVal>::max();
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user