Struct Timestamp
Structure for time value representation.
Implements
Namespace: OpenDDSharp
Assembly: OpenDDSharp.dll
Syntax
public struct Timestamp
Properties
| Improve this Doc View SourceNanoSeconds
Gets or sets the microseconds.
Declaration
public uint NanoSeconds { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
Seconds
Gets or sets the seconds.
Declaration
public int Seconds { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
| Improve this Doc View SourceEquals(Timestamp)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Timestamp other)
Parameters
| Type | Name | Description |
|---|---|---|
| Timestamp | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the current object is equal to the other parameter; otherwise, false. |
Equals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the specified object is equal to the current object; otherwise, false. |
FromCDR(Span<Byte>)
Updates the time value from a CDR representation.
Declaration
public void FromCDR(Span<byte> span)
Parameters
| Type | Name | Description |
|---|---|---|
| Span<System.Byte> | span | The byte span serialized. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| System.Int32 | A hash code for the current object. |
ToCDR()
Converts the time value to a CDR representation.
Declaration
public ReadOnlySpan<byte> ToCDR()
Returns
| Type | Description |
|---|---|
| ReadOnlySpan<System.Byte> | The byte span serialized. |
Operators
| Improve this Doc View SourceEquality(Timestamp, Timestamp)
Equals comparison operator.
Declaration
public static bool operator ==(Timestamp left, Timestamp right)
Parameters
| Type | Name | Description |
|---|---|---|
| Timestamp | left | The left value for the comparison. |
| Timestamp | right | The right value for the comparison. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the left object is equal to the right object; otherwise, false. |
Inequality(Timestamp, Timestamp)
Not equals comparison operator.
Declaration
public static bool operator !=(Timestamp left, Timestamp right)
Parameters
| Type | Name | Description |
|---|---|---|
| Timestamp | left | The left value for the comparison. |
| Timestamp | right | The right value for the comparison. |
Returns
| Type | Description |
|---|---|
| System.Boolean | false if the left object is equal to the right object; otherwise, true. |