cloudflare / cloudflare/workers-rs
[Feature] support time
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Description
I want a way to get the exact time in the function running.
While I know there are some ways to get the time, there is no way to update the time while executing the code.
`Instant::now();` is not supported yet and the current workaround is either using the js `js_sys::Date::new_0();` or by using the instant crate [instant](https://github.com/sebcrozet/instant)
Contributor guide
Research direction
The issue only identifies Instant::now(), js_sys::Date::new_0(), and the instant crate as relevant entry points; start by locating how time APIs are exposed in workers-rs and where the runtime's current time can be queried. Define the supported behavior and add coverage for exact time during execution; the issue provides no file or test names, so scope needs maintainer clarification first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rust, wasm
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100