Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

def realTime: F[FiniteDuration] only provides millisecond precision #699

Open
dhpiggott opened this issue Sep 12, 2024 · 0 comments
Open

Comments

@dhpiggott
Copy link

I'm debugging an issue with a tracing library which works with cats.effect.kernel.Clock.realTime: F[FiniteDuration]. In services which use this tracing library and Cats Effect, traces have nanosecond accuracy. In the service I'm working on, which uses ZIO and interop-cats, I'm only getting millisecond accuracy, and I've tracked it to this:

currentTime(MILLISECONDS).map(FiniteDuration(_, MILLISECONDS))

Could it be changed to provide nanosecond precision?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant