|
Joutsen
v0.4.1
|
A static class containing extensions for the System.TimeSpan class. More...
Static Public Member Functions | |
| static String | ToUnitString (this TimeSpan timeSpan, String numberFormat="0.###") |
| Creates a string representation of timeSpan which represents the time unit that is bigger than zero. More... | |
| static String | TicksToUnitString (double tickFractions, String numberFormat="0.###") |
| Creates a string representation of a number of ticks. More... | |
Public Attributes | |
| const long | MICROSECOND_TICKS = 10L |
| Number of Ticks in a microsecond. More... | |
| const long | MILLISECOND_TICKS = MICROSECOND_TICKS * 1000L |
| Number of Ticks in a millisecond. More... | |
| const long | SECOND_TICKS = MILLISECOND_TICKS * 1000 |
| Number of Ticks in a second. More... | |
| const long | MINUTE_TICKS = SECOND_TICKS * 60 |
| Number of Ticks in a minute. More... | |
| const long | HOUR_TICKS = MINUTE_TICKS * 60 |
| Number of Ticks in am hour. More... | |
| const long | DAY_TICKS = HOUR_TICKS * 24 |
| Number of Ticks in a day. More... | |
A static class containing extensions for the System.TimeSpan class.
|
static |
Creates a string representation of a number of ticks.
The resulting representation consists of the number of the biggest possible time unit and the time unit representation. E.g. 2000 Ticks results in 2 ms.
| tickFractions | the number of ticks, can also be a fraction |
| numberFormat | the number format of the output, something like 0.0 for one integer and one decimal palce. See String.Format for details. |
tickFractions in the format including a tiem unit
|
static |
Creates a string representation of timeSpan which represents the time unit that is bigger than zero.
| timeSpan | The value for which to create the string |
| numberFormat | the number format of the output, something like 0.0 for one integer and one decimal palce. See String.Format for details. |
| const long Joutsen.System.TimeSpanExtensions.DAY_TICKS = HOUR_TICKS * 24 |
Number of Ticks in a day.
| const long Joutsen.System.TimeSpanExtensions.HOUR_TICKS = MINUTE_TICKS * 60 |
Number of Ticks in am hour.
| const long Joutsen.System.TimeSpanExtensions.MICROSECOND_TICKS = 10L |
Number of Ticks in a microsecond.
| const long Joutsen.System.TimeSpanExtensions.MILLISECOND_TICKS = MICROSECOND_TICKS * 1000L |
Number of Ticks in a millisecond.
| const long Joutsen.System.TimeSpanExtensions.MINUTE_TICKS = SECOND_TICKS * 60 |
Number of Ticks in a minute.
| const long Joutsen.System.TimeSpanExtensions.SECOND_TICKS = MILLISECOND_TICKS * 1000 |
Number of Ticks in a second.
1.8.13