Aspose::Cells::Duration struct
Contents
[
Hide
]Duration struct
Represents a time interval with a resolution of 100 nanoseconds (tick).
struct Duration
Methods
| Method | Description |
|---|---|
| Duration(int64_t v) | Initializes a new instance from a tick value. |
| Duration(int hours, int minutes, int seconds) | Initializes a new instance from hours, minutes, and seconds. |
| Duration(int days, int hours, int minutes, int seconds) | Initializes a new instance from days, hours, minutes, and seconds. |
| Duration(int days, int hours, int minutes, int seconds, int milliseconds) | Initializes a new instance from days, hours, minutes, seconds, and milliseconds. |
| static FromDays(double value) | Creates a Duration from a specified number of days. |
| static FromMilliseconds(double value) | Creates a Duration from a specified number of milliseconds. |
| static FromMinutes(double value) | Creates a Duration from a specified number of minutes. |
| static FromSeconds(double value) | Creates a Duration from a specified number of seconds. |
| static FromTicks(int64_t value) | Creates a Duration from a specified number of ticks. |
| GetDays() const | Gets the day component of the time interval. |
| GetHours() const | Gets the hour component (0-23). |
| GetMilliseconds() const | Gets the millisecond component (0-999). |
| GetMinutes() const | Gets the minute component (0-59). |
| GetSeconds() const | Gets the second component (0-59). |
| GetTicks() const | Gets the total number of ticks represented by this instance. |
| GetTotalDays() const | Gets the total number of days represented by this instance. |
| GetTotalHours() const | Gets the total number of hours represented by this instance. |
| GetTotalMilliseconds() const | Gets the total number of milliseconds represented by this instance. |
| GetTotalMinutes() const | Gets the total number of minutes represented by this instance. |
| GetTotalSeconds() const | Gets the total number of seconds represented by this instance. |
| operator!=(const Duration& ts) const | Determines whether two Duration instances are not equal. |
| operator*(double factor) const | Multiplies the time interval by a scalar factor. |
| operator+(const Duration& ts) const | Adds two time intervals. |
| operator+() const | Returns the current instance (unary plus). |
| operator-(const Duration& ts) const | Subtracts one time interval from another. |
| operator-() const | Returns a new Duration whose value is the negation of the current instance. |
| operator/(const Duration& ts) const | Returns the ratio between two time intervals. |
| operator/(double divisor) const | Divides the time interval by a scalar value. |
| operator<(const Duration& ts) const | Determines whether the current instance is less than another. |
| operator<=(const Duration& ts) const | Determines whether the current instance is less than or equal to another. |
| operator==(const Duration& ts) const | Determines whether two Duration instances are equal. |
| operator>(const Duration& ts) const | Determines whether the current instance is greater than another. |
| operator>=(const Duration& ts) const | Determines whether the current instance is greater than or equal to another. |
Fields
| Field | Description |
|---|---|
| value | Internal representation of the time interval in ticks. 1 tick = 100 nanoseconds. |
See Also
- Namespace Aspose::Cells
- Library Aspose.Cells for C++