AbstractDoubleTimeSource
Constructors
<init>
An abstract class used to implement time sources that return their readings as Double values in the specified unit .
AbstractDoubleTimeSource
(
unit
:
DurationUnit
)
Properties
unit
The unit in which this time source's readings are expressed.
val
unit
:
DurationUnit
Functions
markNow
Marks a point in time on this time source.
open
fun
markNow
(
)
:
ComparableTimeMark
Extension Functions
measureTime
Executes the given function block and returns the duration of elapsed time interval.
fun
TimeSource
.
measureTime
(
block
:
(
)
->
Unit
)
:
Duration
measureTimedValue
Executes the given function block and returns an instance of TimedValue class, containing both the result of function execution and the duration of elapsed time interval.
fun
<
T
>
TimeSource
.
measureTimedValue
(
block
:
(
)
->
T
)
:
TimedValue
<
T
>