Represents a moment in time.
More...
Inherits IEquatable< Time >, and IComparable< Time >.
Represents a moment in time.
◆ Time()
Omg.Dds.Core.Time.Time |
( |
long |
sec, |
|
|
uint |
nsec = 0 |
|
) |
| |
Creates a new object with the specified absolute number of seconds and nanoseconds.
◆ FromSeconds() [1/2]
static Time Omg.Dds.Core.Time.FromSeconds |
( |
ulong |
seconds | ) |
|
|
static |
Creates a time from the specified total number of seconds.
◆ FromSeconds() [2/2]
static Time Omg.Dds.Core.Time.FromSeconds |
( |
double |
seconds | ) |
|
|
static |
Creates a time from the specified total number of seconds.
◆ FromMilliseconds()
static Time Omg.Dds.Core.Time.FromMilliseconds |
( |
ulong |
ms | ) |
|
|
static |
Creates a time from the specified total number of milliseconds.
◆ CompareTo()
int Omg.Dds.Core.Time.CompareTo |
( |
Time |
other | ) |
|
◆ Equals() [1/2]
bool Omg.Dds.Core.Time.Equals |
( |
Time |
other | ) |
|
Compares two times for equality.
◆ Equals() [2/2]
override bool Omg.Dds.Core.Time.Equals |
( |
object |
obj | ) |
|
Compares two objects for equality.
◆ GetHashCode()
override int Omg.Dds.Core.Time.GetHashCode |
( |
| ) |
|
◆ ToString()
override string Omg.Dds.Core.Time.ToString |
( |
| ) |
|
Converts this object to a string.
◆ operator==()
static bool Omg.Dds.Core.Time.operator== |
( |
in Time |
a, |
|
|
in Time |
b |
|
) |
| |
|
static |
◆ operator!=()
static bool Omg.Dds.Core.Time.operator!= |
( |
in Time |
a, |
|
|
in Time |
b |
|
) |
| |
|
static |
◆ operator<()
static bool Omg.Dds.Core.Time.operator< |
( |
in Time |
a, |
|
|
in Time |
b |
|
) |
| |
|
static |
Determines if one time value is smaller than another one.
◆ operator>()
static bool Omg.Dds.Core.Time.operator> |
( |
in Time |
a, |
|
|
in Time |
b |
|
) |
| |
|
static |
Determines if one time value is greater than another one.
◆ operator<=()
static bool Omg.Dds.Core.Time.operator<= |
( |
in Time |
a, |
|
|
in Time |
b |
|
) |
| |
|
static |
Determines if one time value is smaller or equal than another one.
◆ operator>=()
static bool Omg.Dds.Core.Time.operator>= |
( |
in Time |
a, |
|
|
in Time |
b |
|
) |
| |
|
static |
Determines if one time value is greater or equal than another one.
◆ operator-()
Calculate the duration between two times
◆ NanosecondsPerSecond
const uint Omg.Dds.Core.Time.NanosecondsPerSecond = 1_000_000_000 |
|
static |
Number of nanoseconds in a second
◆ NanosecondsPerMillisecond
const uint Omg.Dds.Core.Time.NanosecondsPerMillisecond = 1_000_000 |
|
static |
Number of nanoseconds in a millisecond
◆ MillisecondsPerSecond
const uint Omg.Dds.Core.Time.MillisecondsPerSecond = 1_000 |
|
static |
Number of milliseconds in a second
◆ Zero
Time Omg.Dds.Core.Time.Zero = new Time(0, 0) |
|
staticget |
The default instant in time: zero seconds and zero nanoseconds
The full documentation is available in the C API: DDSTime_tTIME_ZERO
◆ MaxValue
Time Omg.Dds.Core.Time.MaxValue |
|
staticget |
Initial value:
0x7fffffffffffffff,
0xffffffff)
Time(long sec, uint nsec=0)
Creates a new object with the specified absolute number of seconds and nanoseconds.
The maximum valid value of Time
◆ Invalid
Time Omg.Dds.Core.Time.Invalid = new Time(-1, 0xffffffff) |
|
staticget |
A special sentinel that indicates an invalid or unknown time.
◆ Seconds
long Omg.Dds.Core.Time.Seconds |
|
get |
Gets the second component of this object.
◆ Nanoseconds
uint Omg.Dds.Core.Time.Nanoseconds |
|
get |
Gets the nanosecond component of this object.
◆ TotalMilliseconds
ulong Omg.Dds.Core.Time.TotalMilliseconds |
|
get |
Gets the total number of milliseconds