Closed rushiiMachine closed 11 months ago
Thanks for opening this. We need the raw times in clocksource for a variety of reasons. Neither the std library nor quanta
really fit the specific needs.
I believe clocksource should just be extended to provide coverage for other platforms as-needed.
This is fixed by #92 - new versions of all crates are published. Please open a new issue if you discover any problems.
clocksource
(and in turn,ratelimit
) relies on an UNIX time API, making this library unusable on other platformshttps://github.com/pelikan-io/rustcommon/blob/89633481ec10e7ca1f389522471f22de54afba04/clocksource/src/precise/instant.rs#L29-L35
Expected behavior
Use either
std::time::Instant
instead which already provides all platform implementationsInstant
doesn't seem to provide raw ns values, so to avoid rewriting half the lib but I found a different lib that does: quanta