Permalink
Please
sign in to comment.
Browse files
process: implement process.hrtime.bigint()
PR-URL: #21256 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
- Loading branch information...
Showing
with
71 additions
and 3 deletions.
- +32 −0 doc/api/process.md
- +3 −2 lib/internal/bootstrap/node.js
- +9 −1 lib/internal/process.js
- +1 −0 src/bootstrapper.cc
- +1 −0 src/node_internals.h
- +11 −0 src/node_process.cc
- +14 −0 test/parallel/test-process-hrtime-bigint.js
| @@ -0,0 +1,14 @@ | |||
| 'use strict'; | |||
|
|
|||
| // Tests that process.hrtime.bigint() works. | |||
|
|
|||
| require('../common'); | |||
| const assert = require('assert'); | |||
|
|
|||
| const start = process.hrtime.bigint(); | |||
| assert.strictEqual(typeof start, 'bigint'); | |||
|
|
|||
| const end = process.hrtime.bigint(); | |||
| assert.strictEqual(typeof end, 'bigint'); | |||
|
|
|||
| assert(end - start >= 0n); | |||
0 comments on commit
f1b18ba