diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-06-11 17:37:09 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2018-06-17 22:34:58 +0800 |
commit | 1d8a23173311337d93c365cba3357ac6f87eb39c (patch) | |
tree | a9518b91613f80cc5b7db530a66dea3d4578d619 /test/parallel/test-process-hrtime-bigint.js | |
parent | 54ee8cb5dd28e9e72770ee4ab6aa73d700232cb5 (diff) | |
download | node-new-1d8a23173311337d93c365cba3357ac6f87eb39c.tar.gz |
process: implement process.hrtime.bigint()
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/parallel/test-process-hrtime-bigint.js')
-rw-r--r-- | test/parallel/test-process-hrtime-bigint.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/parallel/test-process-hrtime-bigint.js b/test/parallel/test-process-hrtime-bigint.js new file mode 100644 index 0000000000..e5ce40a994 --- /dev/null +++ b/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); |