Hello, is there a way to set the system clock in t...
# kotlinx-datetime
d
Hello, is there a way to set the system clock in tests to mock getTimeMillis()?
h
You should pass your own Clock.
d
Yeah, I know, wrote a wrapper now
h
What do you mean with wrapper? There is TimeSource to measure times (Duration) and Clock for walltime and Date/TimeeZone support
d
A wrapper around getTimeMillis, so I can mock it
h
Just don’t use getTimeMillie but measureTime with your mocked TimeSource.