Skip to content

Commit

Permalink
Remove the cputime clocks. (WebAssembly#197)
Browse files Browse the repository at this point in the history
* Remove the cputime clocks.

Remove $process_cputime_id and $thread_cputime_id.

Some implementations will not have one wasm nanoprocess per OS process,
or one wasm thread per OS thread, making it difficult to implement
$process_cputime_id meaningfully. Also, the concept of "cputime"
available in most host environments isn't easy to directly connect to
what we might expect "cputime" to mean for wasm code.

These correspond to `CLOCK_PROCESS_CPUTIME_ID` and `CLOCK_THREAD_CPUTIME_ID`
in POSIX, which are optional:

https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html

* Auto-generate docs.
  • Loading branch information
sunfishcode authored Feb 19, 2020
1 parent 694e085 commit 2054cc4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions phases/ephemeral/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ real time, whose value cannot be adjusted and which cannot have negative
clock jumps. The epoch of this clock is undefined. The absolute time
value of this clock therefore has no meaning.

- <a href="#clockid.process_cputime_id" name="clockid.process_cputime_id"></a> `process_cputime_id`
The CPU-time clock associated with the current process.

- <a href="#clockid.thread_cputime_id" name="clockid.thread_cputime_id"></a> `thread_cputime_id`
The CPU-time clock associated with the current thread.

## <a href="#errno" name="errno"></a> `errno`: Enum(`u16`)
Error codes returned by functions.
Not all of these error codes are returned by the functions provided by this
Expand Down
4 changes: 0 additions & 4 deletions phases/ephemeral/witx/typenames.witx
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
;;; clock jumps. The epoch of this clock is undefined. The absolute time
;;; value of this clock therefore has no meaning.
$monotonic
;;; The CPU-time clock associated with the current process.
$process_cputime_id
;;; The CPU-time clock associated with the current thread.
$thread_cputime_id
)
)

Expand Down

0 comments on commit 2054cc4

Please sign in to comment.