A time interval with nanosecond resolution.
Synopsis
Declared in <bsls_timeinterval.h>
class TimeInterval;
Description
Each instance of this value‐semantic type represents a time interval with nanosecond resolution. In the "canonical representation" of a time interval, the seconds field may have any 64‐bit signed integer value, with the nanoseconds field limited to the range [ ‐999,999,999..999,999,999 ], and with the additional constraint that the two fields are either both non‐negative or both non‐positive.
Member Functions
Name |
Description |
|
Constructors |
Assign this interval from a real number of seconds. |
|
Add the specified number of |
|
Add the specified chrono |
|
Add the specified number of |
|
Add |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Add the specified number of |
|
Return this interval as a |
|
Assign this object from the specified BDEX input |
|
Write this object to the specified BDEX output |
|
Return whether this interval fits in |
|
Return the nanoseconds field in the canonical representation of the value of this time interval. |
|
Addition assignment operators |
|
Subtraction assignment operators |
|
Write this object to the specified output |
|
Return the seconds field in the canonical representation of the value of this time interval. |
|
Set this interval from |
|
Set this interval from a canonical |
|
Set this interval to the specified total number of |
|
Set this interval to the specified total number of |
|
Set the overall value of this object to indicate the specified integral number of |
|
Set the overall value of this object to indicate the specified integral number of |
|
Set this interval to the specified total number of |
|
Set the overall value of this object to indicate the specified integral number of |
|
Set the overall value of this object to indicate the specified integral number of |
|
Format this time to the specified output |
|
Return the value of this time interval as an integral number of days, rounded towards zero. Note that the return value may be negative. |
|
Return the value of this time interval as an integral number of hours, rounded towards zero. Note that the return value may be negative. |
|
Return this interval as whole microseconds, rounded toward zero. |
|
Return this interval as whole milliseconds, rounded toward zero. |
|
Return the value of this time interval as an integral number of minutes, rounded towards zero. Note that the return value may be negative. |
|
Return this interval as whole nanoseconds. |
|
Return this interval as whole seconds, rounded toward zero. |
|
Return this interval as a real number of seconds. |
Static Member Functions
Name |
Description |
|
|
|
|
Return the most current BDEX streaming version number supported by this class. |
Non-Member Functions
Name |
Description |
Return |
|
Same as the preceding overload. |
|
Convert the specified |
|
Convert the specified |
|
Convert the specified |
|
Convert the specified |
|
Convert the specified |
|
Convert the specified |
|
Return the sum of the specified |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
Return a |
|
Return the difference between the specified |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
Return |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
Return |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
Same as the preceding overload. |
|
|
Return the sum of a time interval and a datetime. |
Created with MrDocs