![]() |
OpenSplice C# API
v6.x
OpenSplice C# Data Distribution Service Data-Centric Publish-Subscribe API
|
Duration represents a time interval. More...
Public Member Functions | |
Duration (int seconds, uint nanoSeconds) | |
Create a Duration elapsing a specific amount of time. More... | |
override bool | Equals (object obj) |
Test this Duration is equal to the provided Duration. More... | |
override int | GetHashCode () |
Calculates hash of the Duration. More... | |
override string | ToString () |
Converts Duration to a string. More... | |
Static Public Member Functions | |
static Duration | FromMilliseconds (double value) |
Create a Duration based on milliseconds. More... | |
static Duration | FromTimeSpan (TimeSpan value) |
Create a Duration based on TimeSpan. More... | |
static bool | operator!= (Duration duration1, Duration duration2) |
Test if two Durations are not equal. More... | |
static bool | operator== (Duration duration1, Duration duration2) |
Test if two Durations are equal. More... | |
Static Public Attributes | |
static readonly Duration | Infinite = new Duration(InfiniteSec, InfiniteNanoSec) |
Create an infinite Duration. More... | |
static readonly Duration | Zero = new Duration(ZeroSec, ZeroNanoSec) |
Create a Duration elapsing zero seconds. More... | |
Properties | |
uint | NanoSec [get, set] |
Gets the nanoseconds part of the Duration. More... | |
int | Sec [get, set] |
Gets the seconds part of the Duration. More... | |
Duration represents a time interval.
Duration can be converted to and from Durations expressed in milliseconds (or other units) as integer types.
Definition at line 65 of file DdsDcpsStructs.cs.
|
inline |
Create a Duration elapsing a specific amount of time.
seconds | Amount of seconds for the Duration. |
nanoSeconds | Amount of nanoseconds for the Duration. |
Definition at line 138 of file DdsDcpsStructs.cs.
|
inline |
|
inlinestatic |
Create a Duration based on milliseconds.
value | Milliseconds value to convert to Duration |
Definition at line 125 of file DdsDcpsStructs.cs.
|
inlinestatic |
Create a Duration based on TimeSpan.
value | TimeSpan value to convert to Duration |
Definition at line 114 of file DdsDcpsStructs.cs.
|
inline |
Calculates hash of the Duration.
Definition at line 165 of file DdsDcpsStructs.cs.
Test if two Durations are not equal.
Definition at line 191 of file DdsDcpsStructs.cs.
Test if two Durations are equal.
Definition at line 178 of file DdsDcpsStructs.cs.
|
inline |
Converts Duration to a string.
Definition at line 202 of file DdsDcpsStructs.cs.
Create an infinite Duration.
Definition at line 101 of file DdsDcpsStructs.cs.
Create a Duration elapsing zero seconds.
Definition at line 106 of file DdsDcpsStructs.cs.
|
getset |
Gets the nanoseconds part of the Duration.
Definition at line 85 of file DdsDcpsStructs.cs.
|
getset |
Gets the seconds part of the Duration.
Definition at line 74 of file DdsDcpsStructs.cs.