Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/util/time_stopping.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class time_periodt:public fine_timet
{
return time_periodt(t-other.t);
}

friend class absolute_timet;
};

class absolute_timet:public fine_timet
Expand All @@ -89,6 +91,16 @@ class absolute_timet:public fine_timet
{
return time_periodt(t-other.t);
}

absolute_timet operator+(const time_periodt &other)
{
return absolute_timet(t+other.t);
}

bool operator>=(const absolute_timet &other)
{
return t>=other.t;
}
};

absolute_timet current_time();
Expand Down