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

Runtime error trying to use process.hrtime() #2692

Closed
brian-hay opened this issue Apr 23, 2023 · 1 comment
Closed

Runtime error trying to use process.hrtime() #2692

brian-hay opened this issue Apr 23, 2023 · 1 comment
Labels

Comments

@brian-hay
Copy link

Question

When I try to use process.hrtime() I receive a runtime error:

import { process } from 'process';

export function start(): void {
  const time: u64 = process.hrtime();
}
caught TypeError: Illegal invocation
    at ~lib/process/process.hrtime (process.ts:36:15)
    at assembly/index/start (index.ts:63:21)
@dcodeIO
Copy link
Member

dcodeIO commented Apr 23, 2023

Should be fixed by #2657. Mentions performance.now, which process.hrtime calls under the hood.

@dcodeIO dcodeIO closed this as completed Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants