Skip to content

[FEATURE REQUEST] Set Virtual Time #13

@tungs

Description

@tungs

Is your feature request related to a problem? Please describe.
For certain time-based programs, it'd be useful to be able to set the virtual time so that new Date() and Date.now() can return predictable and setable values.

Describe the solution you'd like
Have a function to set the time, like timeweb.setVirtualTime or timeweb.virtual.setTime (if using the virtual namespace)

Describe alternatives you've considered
None

Additional context
timeweb currently sets the initial virtual time used for Dates based off of the realtime time. Initial running page time is set to zero.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions