WebAssembly / WebAssembly/WASI

monotonic `now` should not care about rollover, except to describe maximum duration

Open
#697 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P-clocks S-inactive
Dominant language
Rust
Stars
5.8k
Forks
333
Avg merge
2d 13h
Merged PRs (30d)
3

Description

In the review session there was a question about if now should handle overflow. I think more precisely it shouldn't be interpreted in a way that assumes monotonic starts at zero. The only important part is the max knowable duration and that depends on if it is interpreted as signed or not.

java's docs are pretty decent on this https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#nanoTime-- note that it indicates the value as a signed number

The value returned represents nanoseconds since some fixed but arbitrary origin time (perhaps in the future, so values may be negative)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The payload names no source file, test, or entry point. Start with the linked Java System.nanoTime documentation and the existing review discussion; done means the intended rollover, signedness, and maximum-duration semantics are explicitly decided.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.