Functions

currentMilliseconds

currentMilliseconds(): Number

Returns the current time in milliseconds

duration

duration(() → T): DurationMessurement<T>

Executes the function and returns an object with the taken time in milliseconds with the result of the function

time

time(() → T): TimeMessurement<T>

Executes the specified function and returns an object with the start time and end time with the result of the function

toMilliseconds

toMilliseconds(DateTime): Number

Returns the representation of the specified DateTime in milliseconds

Types

DurationMessurement

Represents a time taken by a function call

Definition
1
{ time: Number, result: T }

TimeMessurement

Represents a start/end time meassurement

Definition
1
{ start: DateTime, result: T, end: DateTime }