Time span with micro second granularity. More...
Public Member Functions | |
| UsTimeSpan (long ticks) | |
| Initializes this timespan from the given ticks . | |
| UsTimeSpan (int days, int hours, int minutes, int seconds, int milliseconds, int microseconds) | |
| Initializes this timespan from the given times. | |
| UsTimeSpan (int days, int hours, int minutes, int seconds, int milliseconds) | |
| Initializes this timespan from the given times. | |
| UsTimeSpan (int days, int hours, int minutes, int seconds) | |
| Initializes this timespan from the given times. | |
| UsTimeSpan (int hours, int minutes, int seconds) | |
| Initializes this timespan from the given times. | |
| UsTimeSpan (TimeSpan timeSpan) | |
Creates a UsTimeSpan from the given timeSpan . | |
| override bool | Equals (object obj) |
| Returns a value indicating whether this instance is equal to the given obj . | |
| override int | GetHashCode () |
| Returns a hash code for this instance. | |
| override string | ToString () |
| Returns the string representation of the value of this instance. | |
| UsTimeSpan | Add (UsTimeSpan timeSpan) |
| Gets the sum of this and the given timeSpan . | |
| UsTimeSpan | Duration () |
Gets new UsTimeSpan whose value is the absolute value of this object. | |
| UsTimeSpan | Negate () |
| Gets the same value of this object with a changed sign. | |
| UsTimeSpan | Subtract (UsTimeSpan timeSpan) |
| Gets the difference of this and the given timeSpan . | |
| int | CompareTo (object obj) |
| Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object. | |
| int | CompareTo (UsTimeSpan other) |
| Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object. | |
| bool | Equals (UsTimeSpan other) |
| Returns a value indicating whether this instance is equal to given other object. | |
Static Public Member Functions | |
| static UsTimeSpan | FromDays (double days) |
Returns UsTimeSpan that represents a specified number of days . | |
| static UsTimeSpan | FromHours (double hours) |
Returns UsTimeSpan that represents a specified number of hours . | |
| static UsTimeSpan | FromMicroseconds (double microseconds) |
Returns UsTimeSpan that represents a specified number of microseconds . | |
| static UsTimeSpan | FromMilliseconds (double milliseconds) |
Returns UsTimeSpan that represents a specified number of milliseconds . | |
| static UsTimeSpan | FromMinutes (double minutes) |
Returns UsTimeSpan that represents a specified number of minutes . | |
| static UsTimeSpan | FromSeconds (double seconds) |
Returns UsTimeSpan that represents a specified number of seconds . | |
| static UsTimeSpan | FromTicks (long ticks) |
Returns UsTimeSpan that represents a specified number of ticks . | |
| static | operator TimeSpan (UsTimeSpan timeSpan) |
| Explicitly converts the timeSpan into a TimeSpan object. | |
| static implicit | operator UsTimeSpan (TimeSpan timeSpan) |
Implicitly converts the given timeSpan into a UsTimeSpan object. | |
| static UsTimeSpan | operator- (UsTimeSpan other) |
| Gets the same value of other object with a changed sign. | |
| static UsTimeSpan | operator- (UsTimeSpan lhs, UsTimeSpan rhs) |
| Subtracts rhs from lhs . | |
| static UsTimeSpan | operator+ (UsTimeSpan other) |
| Gets the same value of other object. | |
| static UsTimeSpan | operator+ (UsTimeSpan lhs, UsTimeSpan rhs) |
| Adds lhs to rhs . | |
| static bool | operator!= (UsTimeSpan lhs, UsTimeSpan rhs) |
| Inequality operator. | |
| static bool | operator== (UsTimeSpan lhs, UsTimeSpan rhs) |
| Equality operator. | |
| static bool | operator< (UsTimeSpan lhs, UsTimeSpan rhs) |
| Less operator. | |
| static bool | operator<= (UsTimeSpan lhs, UsTimeSpan rhs) |
| Less or equal to operator. | |
| static bool | operator> (UsTimeSpan lhs, UsTimeSpan rhs) |
| Greater operator. | |
| static bool | operator>= (UsTimeSpan lhs, UsTimeSpan rhs) |
| Greater or equal operator. | |
Static Public Attributes | |
| static readonly UsTimeSpan | Zero = new UsTimeSpan(0) |
| Represents the zero UsTimeSpan value. This field is read-only. | |
| static readonly UsTimeSpan | MaxValue = new UsTimeSpan(long.MaxValue) |
| Represents the maximum UsTimeSpan value. This field is read-only. | |
| static readonly UsTimeSpan | MinValue = new UsTimeSpan(long.MinValue) |
| Represents the minimum UsTimeSpan value. This field is read-only. | |
| const long | TicksPerDay = 864000000000 |
| Represents the number of ticks in 1 day. | |
| const long | TicksPerHour = 36000000000 |
| Represents the number of ticks in 1 hour. | |
| const long | TicksPerMicrosecond = 10 |
| Represents the number of ticks in 1 microsecond. | |
| const long | TicksPerMillisecond = 10000 |
| Represents the number of ticks in 1 millisecond. | |
| const long | TicksPerMinute = 600000000 |
| Represents the number of ticks in 1 minute. | |
| const long | TicksPerSecond = 10000000 |
| Represents the number of ticks in 1 second. | |
Time span with micro second granularity.
| UsTimeSpan | ( | long | ticks | ) |
Initializes this timespan from the given ticks .
| ticks | Ticks to initialize with. |
| UsTimeSpan | ( | int | days, |
| int | hours, | ||
| int | minutes, | ||
| int | seconds, | ||
| int | milliseconds, | ||
| int | microseconds ) |
Initializes this timespan from the given times.
| days | A number of days |
| hours | A number of hours |
| minutes | A number of minuts. |
| seconds | A number of seconds. |
| milliseconds | A number of milliseconds. |
| microseconds | A number of microseconds. |
| UsTimeSpan | ( | int | days, |
| int | hours, | ||
| int | minutes, | ||
| int | seconds, | ||
| int | milliseconds ) |
Initializes this timespan from the given times.
| days | A number of days |
| hours | A number of hours |
| minutes | A number of minuts. |
| seconds | A number of seconds. |
| milliseconds | A number of milliseconds. |
| UsTimeSpan | ( | int | days, |
| int | hours, | ||
| int | minutes, | ||
| int | seconds ) |
Initializes this timespan from the given times.
| days | A number of days |
| hours | A number of hours |
| minutes | A number of minuts. |
| seconds | A number of seconds. |
| UsTimeSpan | ( | int | hours, |
| int | minutes, | ||
| int | seconds ) |
Initializes this timespan from the given times.
| hours | A number of hours |
| minutes | A number of minuts. |
| seconds | A number of seconds. |
| UsTimeSpan | ( | TimeSpan | timeSpan | ) |
Creates a UsTimeSpan from the given timeSpan .
| timeSpan | Time span to create this on of. |
| UsTimeSpan Add | ( | UsTimeSpan | timeSpan | ) |
Gets the sum of this and the given timeSpan .
| timeSpan | The span to add. |
| int CompareTo | ( | object | obj | ) |
Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object.
| obj | An object to compare, or null. |
| int CompareTo | ( | UsTimeSpan | other | ) |
Compares this instance to a specified object and returns an integer that indicates whether this instance is shorter than, equal to, or longer than the specified object.
| other | An object to compare. |
| UsTimeSpan Duration | ( | ) |
Gets new UsTimeSpan whose value is the absolute value of this object.
| override bool Equals | ( | object | obj | ) |
Returns a value indicating whether this instance is equal to the given obj .
| obj | An object to compare with this instance. |
true if obj represents the same time interval as this instance; false otherwise.| bool Equals | ( | UsTimeSpan | other | ) |
Returns a value indicating whether this instance is equal to given other object.
| other | Object to compare with this instance. |
true if other represents the same time interval as this instance; false otherwise.
|
static |
Returns UsTimeSpan that represents a specified number of days .
| days | A number of days. |
UsTimeSpan that represents that value.
|
static |
Returns UsTimeSpan that represents a specified number of hours .
| hours | A number of hours. |
UsTimeSpan that represents that value.
|
static |
Returns UsTimeSpan that represents a specified number of microseconds .
| microseconds | A number of microseconds. |
UsTimeSpan that represents that value.
|
static |
Returns UsTimeSpan that represents a specified number of milliseconds .
| milliseconds | A number of milliseconds. |
UsTimeSpan that represents that value.
|
static |
Returns UsTimeSpan that represents a specified number of minutes .
| minutes | A number of micro seconds. |
UsTimeSpan that represents that value.
|
static |
Returns UsTimeSpan that represents a specified number of seconds .
| seconds | A number of seconds. |
UsTimeSpan that represents that value.
|
static |
Returns UsTimeSpan that represents a specified number of ticks .
| ticks | Unitless ticks. |
UsTimeSpan that represents that value.| override int GetHashCode | ( | ) |
Returns a hash code for this instance.
| UsTimeSpan Negate | ( | ) |
Gets the same value of this object with a changed sign.
|
explicitstatic |
Explicitly converts the timeSpan into a TimeSpan object.
Only explicit as this is a narrowing conversion.
| timeSpan | Time span to convert. |
|
static |
Implicitly converts the given timeSpan into a UsTimeSpan object.
| timeSpan | Time span to convert. |
|
static |
Inequality operator.
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
true if lhs and rhs are not equal.
|
static |
Adds lhs to rhs .
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
|
static |
Gets the same value of other object.
| other | Value. |
|
static |
Subtracts rhs from lhs .
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
|
static |
Gets the same value of other object with a changed sign.
| other | Value to negate. |
|
static |
Less operator.
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
true if lhs is less than rhs .
|
static |
Less or equal to operator.
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
true if lhs is less than or equal to rhs .
|
static |
Equality operator.
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
true if lhs and rhs are equal.
|
static |
Greater operator.
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
true if lhs is greater than rhs .
|
static |
Greater or equal operator.
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
true if lhs is greater than or equal to rhs .| UsTimeSpan Subtract | ( | UsTimeSpan | timeSpan | ) |
Gets the difference of this and the given timeSpan .
| timeSpan | The span to subtract. |
| override string ToString | ( | ) |
Returns the string representation of the value of this instance.