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

add process.hrtime #55

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

add process.hrtime #55

wants to merge 4 commits into from

Conversation

nichady
Copy link

@nichady nichady commented Jun 8, 2023

No description provided.

@dop251
Copy link
Owner

dop251 commented Jun 12, 2023

Thanks for the submission.

process.hrtime is supposed to work with monotonic clock. In Go there is no direct access to monotonic clock, it's hidden in time.Time returned by time.Now() and then used when calculating difference between two such values.

However, you can try using a similar approach as here: https://github.com/juju/clock/blob/master/monotonic/monotonic.go

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

Successfully merging this pull request may close these issues.

2 participants