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

Implement higher precision clock than time_ns #4367

Open
lzchen opened this issue Dec 19, 2024 · 3 comments
Open

Implement higher precision clock than time_ns #4367

lzchen opened this issue Dec 19, 2024 · 3 comments
Labels
enhancement New feature or request sdk Affects the SDK package.

Comments

@lzchen
Copy link
Contributor

lzchen commented Dec 19, 2024

Followup to #1594

Currently, we use time_ns() to denote current time in ns -> like here

According to Pep0564, the precision varies based off of OS (with testing the average step is that of ~1ms in Windows). Java has implemented an AnchoredClock class which provides much more precise readings of ns (100~ns). We might want to do something similar in our SDKs.

Relevant issue: open-telemetry/semantic-conventions#1621 (comment)

@lzchen lzchen added enhancement New feature or request sdk Affects the SDK package. labels Dec 19, 2024
@lmolkova
Copy link
Contributor

@xrmx
Copy link
Contributor

xrmx commented Jan 17, 2025

Looks like this has been fixed in CPython 3.13 python/cpython#116822

@lmolkova
Copy link
Contributor

lmolkova commented Jan 17, 2025

Looks like this has been fixed in CPython 3.13 python/cpython#116822

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sdk Affects the SDK package.
Projects
None yet
Development

No branches or pull requests

3 participants