7#ifndef PXR_USD_AR_TIMESTAMP_H
8#define PXR_USD_AR_TIMESTAMP_H
13#include "pxr/usd/ar/api.h"
20PXR_NAMESPACE_OPEN_SCOPE
30 : _time(
std::numeric_limits<double>::quiet_NaN())
43 return !std::isnan(_time);
51 if (ARCH_UNLIKELY(!
IsValid())) {
52 _IssueInvalidGetTimeError();
86 return !lhs.
IsValid() || (rhs.
IsValid() && lhs._time <= rhs._time);
98 void _IssueInvalidGetTimeError()
const;
101 template <
class HashState>
102 friend void TfHashAppend(HashState& h,
const ArTimestamp& t)
110PXR_NAMESPACE_CLOSE_SCOPE
Represents a timestamp for an asset.
friend bool operator==(const ArTimestamp &lhs, const ArTimestamp &rhs)
Comparison operators Note that invalid timestamps are considered less than all other timestamps.
double GetTime() const
Return the time represented by this timestamp as a double.
ArTimestamp(double time)
Create a timestamp at time, which must be a Unix time value.
ArTimestamp()
Create an invalid timestamp.
bool IsValid() const
Return true if this timestamp is valid, false otherwise.