Skip to main content

WithClock

Configures the clock to use for time-related operations, primarily for unit testing.

def WithClock(
clock: clock.WithTicker
) - > Option

Configures the clock to use for time related operations. Mainly used for unit testing.

Parameters

NameTypeDescription
clockclock.WithTickerThe clock implementation to use for time-related operations, primarily for testing purposes.

Returns

TypeDescription
OptionAn Option function that sets the clock on the Options struct.