ZeroErr
载入中...
搜索中...
未找到
time.h
浏览该文件的文档.
1#pragma once
2namespace zeroerr {
3struct Duration {
4 double seconds = 0;
5 double count() const noexcept { return seconds; }
7 seconds += other.seconds;
8 return *this;
9 }
10 template <class T>
11 bool operator>(const T& other) const {
12 return seconds > other.count();
13 }
14};
15struct Timestamp {
16 long long nanoseconds = 0;
17};
18} // namespace zeroerr
Definition assert_text.cpp:5
Definition time.h:3
bool operator>(const T &other) const
Definition time.h:11
double seconds
Definition time.h:4
Duration & operator+=(Duration other)
Definition time.h:6
double count() const noexcept
Definition time.h:5
Definition time.h:15
long long nanoseconds
Definition time.h:16