Class AtomicTimeSpan
Represents an atomic TimeSpan type.
Implements
IComparable<TimeSpan>
IEquatable<TimeSpan>
Inherited Members
Namespace: Swan.Threading
Syntax
public sealed class AtomicTimeSpan : AtomicTypeBase<TimeSpan>, IComparable<TimeSpan>, IComparable<AtomicTypeBase<TimeSpan>>, IEquatable<TimeSpan>, IEquatable<AtomicTypeBase<TimeSpan>>
Constructors
AtomicTimeSpan(TimeSpan)
Initializes a new instance of the AtomicTimeSpan class.
Declaration
public AtomicTimeSpan(TimeSpan initialValue)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | initialValue | The initial value. |
Methods
FromLong(Int64)
Converts from a long value to the target type.
Declaration
protected override TimeSpan FromLong(long backingValue)
Parameters
Type | Name | Description |
---|---|---|
Int64 | backingValue | The backing value. |
Returns
Type | Description |
---|---|
TimeSpan | The value converted form a long value. |
Overrides
Swan.Threading.AtomicTypeBase<TimeSpan>.FromLong(System.Int64)
ToLong(TimeSpan)
Converts from the target type to a long value.
Declaration
protected override long ToLong(TimeSpan value)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | value |
Returns
Type | Description |
---|---|
Int64 | The value converted to a long value. |
Overrides
Swan.Threading.AtomicTypeBase<TimeSpan>.ToLong(TimeSpan)
Implements
IComparable<>
IComparable<>
IEquatable<>
IEquatable<>