20 lines
472 B
C++
20 lines
472 B
C++
#pragma once
|
|
#include <cstdint>
|
|
|
|
namespace renderive {
|
|
|
|
struct Time_Of_Day {
|
|
std::int64_t milliseconds = -1;
|
|
[[nodiscard]] bool valid() const {
|
|
return milliseconds >= 0 && milliseconds < 24LL * 60LL * 60LL * 1000LL;
|
|
}
|
|
bool operator==(const Time_Of_Day& other) const {
|
|
return milliseconds == other.milliseconds;
|
|
}
|
|
bool operator!=(const Time_Of_Day& other) const {
|
|
return !(*this == other);
|
|
}
|
|
};
|
|
|
|
} // namespace renderive
|