Lines Matching full:delta
60 /// Creates a zero time delta.
61 datetime::delta::delta(void) : in delta() function in datetime::delta
68 /// Creates a time delta.
70 /// \param seconds_ The seconds in the delta.
71 /// \param useconds_ The microseconds in the delta.
73 /// \throw std::runtime_error If the input delta is negative.
74 datetime::delta::delta(const int64_t seconds_, in delta() function in datetime::delta
81 "datetime::delta class; got: %s") % (*this)); in delta()
86 /// Converts a time expressed in microseconds to a delta.
88 /// \param useconds The amount of microseconds representing the delta.
90 /// \return A new delta object.
92 /// \throw std::runtime_error If the input delta is negative.
93 datetime::delta
94 datetime::delta::from_microseconds(const int64_t useconds) in from_microseconds()
98 "datetime::delta class; got: %sus") % in from_microseconds()
102 return delta(useconds / 1000000, useconds % 1000000); in from_microseconds()
106 /// Convers the delta to a flat representation expressed in microseconds.
108 /// \return The amount of microseconds that corresponds to this delta.
110 datetime::delta::to_microseconds(void) const in to_microseconds()
122 datetime::delta::operator==(const datetime::delta& other) const in operator ==()
134 datetime::delta::operator!=(const datetime::delta& other) const in operator !=()
140 /// Checks if this time delta is shorter than another one.
144 /// \return True if this time delta is shorter than other; false otherwise.
146 datetime::delta::operator<(const datetime::delta& other) const in operator <()
153 /// Checks if this time delta is shorter than or equal to another one.
157 /// \return True if this time delta is shorter than or equal to; false
160 datetime::delta::operator<=(const datetime::delta& other) const in operator <=()
166 /// Checks if this time delta is larger than another one.
170 /// \return True if this time delta is larger than other; false otherwise.
172 datetime::delta::operator>(const datetime::delta& other) const in operator >()
179 /// Checks if this time delta is larger than or equal to another one.
183 /// \return True if this time delta is larger than or equal to; false
186 datetime::delta::operator>=(const datetime::delta& other) const in operator >=()
192 /// Adds a time delta to this one.
194 /// \param other The time delta to add.
196 /// \return The addition of this time delta with the other time delta.
197 datetime::delta
198 datetime::delta::operator+(const datetime::delta& other) const in operator +()
200 return delta::from_microseconds(to_microseconds() + in operator +()
205 /// Adds a time delta to this one and updates this with the result.
207 /// \param other The time delta to add.
209 /// \return The addition of this time delta with the other time delta.
210 datetime::delta&
211 datetime::delta::operator+=(const datetime::delta& other) in operator +=()
218 /// Scales this delta by a positive integral factor.
222 /// \return The scaled delta.
223 datetime::delta
224 datetime::delta::operator*(const std::size_t factor) const in operator *()
226 return delta::from_microseconds(to_microseconds() * factor); in operator *()
230 /// Scales this delta by and updates this delta with the result.
234 /// \return The scaled delta as a reference to the input object.
235 datetime::delta&
236 datetime::delta::operator*=(const std::size_t factor) in operator *=()
250 datetime::operator<<(std::ostream& output, const delta& object) in operator <<()
530 /// Calculates the addition of a delta to a timestamp.
532 /// \param other The delta to add.
536 datetime::timestamp::operator+(const datetime::delta& other) const in operator +()
543 /// Calculates the addition of a delta to this timestamp.
545 /// \param other The delta to add.
549 datetime::timestamp::operator+=(const datetime::delta& other) in operator +=()
556 /// Calculates the subtraction of a delta from a timestamp.
558 /// \param other The delta to subtract.
562 datetime::timestamp::operator-(const datetime::delta& other) const in operator -()
569 /// Calculates the subtraction of a delta from this timestamp.
571 /// \param other The delta to subtract.
575 datetime::timestamp::operator-=(const datetime::delta& other) in operator -=()
582 /// Calculates the delta between two timestamps.
589 /// delta, which are currently not supported.
590 datetime::delta
595 * smallest non-zero delta if time went backwards. in operator -()
598 return datetime::delta::from_microseconds(1); in operator -()
599 return datetime::delta::from_microseconds(to_microseconds() - in operator -()