Class Duration¶
Defined in File Time.hpp
Class Documentation¶
-
class Duration¶
Wraps the standard C++ duration to provide arithmetic, interactions with TimePoints and parsing/formatting functions.
Public Types
-
typedef SystemDuration Basis¶
Public Functions
-
inline Duration()¶
-
Duration(double seconds)¶
-
TimePoint operator+(const TimePoint &t) const¶
Add a Duration to a TimePoint to get a TimePoint (now + 7 days = next week).
-
std::istream &parse(std::istream &is)¶
Set this Duration by parsing the characters in an istream. The characters should either be an integer, representing a number of seconds, or an ISO 8601 P format duration (see https://en.wikipedia.org/wiki/ISO_8601#Durations for example).
-
inline Duration &parse(const std::string &str)¶
Set this Duration by parsing a string. The characters should either be an integer, representing a number of seconds, or an ISO 8601 P format duration (see https://en.wikipedia.org/wiki/ISO_8601#Durations for example).
Public Members
- friend TimePoint
-
typedef SystemDuration Basis¶