Value class for period of time with support for ISO8601 duration format.
More...
|
override string | ToString () |
|
long | GetTime () |
| Returns value in milliseconds. More...
|
|
long | GetNanos () |
| Returns value in nanoseconds. More...
|
|
override bool | Equals (object o) |
|
override int | GetHashCode () |
|
|
static long | Parse (string value) |
|
Value class for period of time with support for ISO8601 duration format.
◆ GetNanos()
long com.dxfeed.util.TimePeriod.GetNanos |
( |
| ) |
|
|
inline |
Returns value in nanoseconds.
- Returns
- Value in nanoseconds.
◆ GetTime()
long com.dxfeed.util.TimePeriod.GetTime |
( |
| ) |
|
|
inline |
Returns value in milliseconds.
- Returns
- Value in milliseconds.
◆ ValueOf() [1/2]
static TimePeriod com.dxfeed.util.TimePeriod.ValueOf |
( |
long |
value | ) |
|
|
inlinestatic |
Returns TimePeriod with value milliseconds.
- Parameters
-
value | Value in milliseconds. |
- Returns
- TimePeriod with value milliseconds.
◆ ValueOf() [2/2]
static TimePeriod com.dxfeed.util.TimePeriod.ValueOf |
( |
string |
value | ) |
|
|
inlinestatic |
Returns TimePeriod represented with a given string.
Allowable format is ISO8601 duration, but there are some simplifications and modifications available: Letters are case insensitive. Letters "P" and "T" can be omitted. Letter "S" can be also omitted. In this case last number will be supposed to be seconds. Number of seconds can be fractional. So it is possible to define duration accurate within milliseconds. Every part can be omitted. It is supposed that it's value is zero then.
- Parameters
-
value | String representation. |
- Returns
- TimePeriod represented with a given string.
- Exceptions
-
FormatException | if cannot parse value. |
◆ ZERO
The documentation for this class was generated from the following file:
- dxf_api/src/util/TimePeriod.cs