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

stdlib's doc: Unix.sleepf: the resolution of the timer is not specified. #7579

Closed
vicuna opened this issue Jul 4, 2017 · 3 comments
Closed

Comments

@vicuna
Copy link

vicuna commented Jul 4, 2017

Original bug ID: 7579
Reporter: berenger
Status: resolved (set by @xavierleroy on 2017-07-04T07:15:36Z)
Resolution: not fixable
Priority: normal
Severity: text
Platform: all
OS: all
OS Version: all
Category: standard library

Bug description

Hello,
It would be nice if the ocamldoc says something about the resolution
of the timer being used.
Currently, I don't know if milliseconds are OK. What about micro seconds?
The danger is that users ask to wait a very small value that is below
the timer's resolution.
And, quite nastily, they would always wait much more than what they asked for.

@vicuna
Copy link
Author

vicuna commented Jul 4, 2017

Comment author: @xavierleroy

The resolution is determined by the underlying operating system, so there is nothing we can document. Sorry.

@vicuna vicuna closed this as completed Jul 4, 2017
@vicuna
Copy link
Author

vicuna commented Jul 4, 2017

Comment author: @dbuenzli

@xLeroy, your first sentence would be a legitimate documentation string.

@vicuna
Copy link
Author

vicuna commented Jul 4, 2017

Comment author: @dra27

Is there a (relatively easy) way we could expose the expected resolution of Unix.sleepf (even if we obviously can't document that)?

That said, standards docs for both sleep and usleep note that you can always end up waiting for longer than you specified.

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

No branches or pull requests

1 participant