Add Time::isNull()

This commit is contained in:
Vinnie Falco
2013-09-12 22:15:04 -07:00
parent e96ce99d3d
commit ca695fa6e1

View File

@@ -97,6 +97,21 @@ public:
*/
static Time BEAST_CALLTYPE getCurrentTime() noexcept;
/** Returns `true` if this object represents "no time", or NULL.
Internally we check for milliseconds since Epoch equal to zero.
*/
/** @{ */
bool isNull () const noexcept
{
return millisSinceEpoch == 0;
}
bool isNotNull () const noexcept
{
return millisSinceEpoch != 0;
}
/** @} */
/** Returns the time as a number of milliseconds.
@returns the number of milliseconds this Time object represents, since