chrono icon indicating copy to clipboard operation
chrono copied to clipboard

Subsecond granularity for task scheduling

Open fsj opened this issue 3 years ago • 0 comments

According to what I could find in task.go, within Option.WithTime(), it appears that the subsecond part of a timestamp is ignored so that scheduling tasks with a granularity better than 1 second is not possible.

My main use case for this would be unit tests, for which scheduling durations around 50-100 ms are usually enough to achieve stable tests while keeping the test execution times small. With the 1 second granularity which is supported at the moment I have several tests that need to run for 5-10 seconds in order to have a stable scheduling order.

fsj avatar Nov 21 '22 08:11 fsj