24#ifndef PXR_USD_AR_TIMESTAMP_H
25#define PXR_USD_AR_TIMESTAMP_H
30#include "pxr/usd/ar/api.h"
37PXR_NAMESPACE_OPEN_SCOPE
47 : _time(
std::numeric_limits<double>::quiet_NaN())
60 return !std::isnan(_time);
68 if (ARCH_UNLIKELY(!
IsValid())) {
69 _IssueInvalidGetTimeError();
103 return !lhs.
IsValid() || (rhs.
IsValid() && lhs._time <= rhs._time);
108 return !(lhs <= rhs);
115 void _IssueInvalidGetTimeError()
const;
118 template <
class HashState>
119 friend void TfHashAppend(HashState& h,
const ArTimestamp& t)
127PXR_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.