RTI Connext C# API
7.0.0
|
Represents a moment in time. More...
Inherits IEquatable< Time >, and IComparable< Time >.
Public Member Functions | |
Time (int sec, uint nsec=0) | |
Creates a new object with the specified absolute number of seconds and nanoseconds. More... | |
int | CompareTo (Time other) |
Compares two times. More... | |
bool | Equals (Time other) |
Compares two times for equality. More... | |
override bool | Equals (object obj) |
Compares two objects for equality. More... | |
override int | GetHashCode () |
Gets the hash code. More... | |
override string | ToString () |
Converts this object to a string. More... | |
Static Public Member Functions | |
static Time | FromSeconds (uint seconds) |
Creates a time from the specified total number of seconds. More... | |
static Time | FromSeconds (double seconds) |
Creates a time from the specified total number of seconds. More... | |
static Time | FromMilliseconds (ulong ms) |
Creates a time from the specified total number of milliseconds. More... | |
static bool | operator== (in Time a, in Time b) |
Compares for equality. More... | |
static bool | operator!= (in Time a, in Time b) |
Compares for inequality. More... | |
static bool | operator< (in Time a, in Time b) |
Determines if one time value is smaller than another one. More... | |
static bool | operator> (in Time a, in Time b) |
Determines if one time value is greater than another one. More... | |
static bool | operator<= (in Time a, in Time b) |
Determines if one time value is smaller or equal than another one. More... | |
static bool | operator>= (in Time a, in Time b) |
Determines if one time value is greater or equal than another one. More... | |
static Duration | operator- (in Time a, in Time b) |
Calculate the duration between two times More... | |
Static Public Attributes | |
const uint | NanosecondsPerSecond |
Number of nanoseconds in a second More... | |
const uint | NanosecondsPerMillisecond |
Number of nanoseconds in a millisecond More... | |
const uint | MillisecondsPerSecond |
Number of milliseconds in a second More... | |
Properties | |
static Time | Zero [get] |
The default instant in time: zero seconds and zero nanoseconds More... | |
static Time | MaxValue [get] |
The maximum valid value of Time More... | |
static Time | Invalid [get] |
A special sentinel that indicates an invalid or unknown time. More... | |
int | Seconds [get] |
Gets the second component of this object. More... | |
uint | Nanoseconds [get] |
Gets the nanosecond component of this object. More... | |
ulong | TotalMilliseconds [get] |
Gets the total number of milliseconds More... | |
Represents a moment in time.
Time | ( | int | sec, |
uint | nsec = 0 |
||
) |
Creates a new object with the specified absolute number of seconds and nanoseconds.
int CompareTo | ( | Time | other | ) |
Compares two times.
override bool Equals | ( | object | obj | ) |
Compares two objects for equality.
bool Equals | ( | Time | other | ) |
Compares two times for equality.
|
static |
Creates a time from the specified total number of milliseconds.
|
static |
Creates a time from the specified total number of seconds.
|
static |
Creates a time from the specified total number of seconds.
override int GetHashCode | ( | ) |
Gets the hash code.
Determines if one time value is smaller than another one.
Determines if one time value is smaller or equal than another one.
Determines if one time value is greater than another one.
Determines if one time value is greater or equal than another one.
override string ToString | ( | ) |
Converts this object to a string.
|
static |
Number of milliseconds in a second
|
static |
Number of nanoseconds in a millisecond
|
static |
Number of nanoseconds in a second
|
staticget |
A special sentinel that indicates an invalid or unknown time.
|
get |
Gets the nanosecond component of this object.
|
get |
Gets the second component of this object.
|
get |
Gets the total number of milliseconds