node/test/parallel/test-process-hrtime-bigint.js
Joyee Cheung 1d8a231733
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>
2018-06-17 22:34:58 +08:00

15 lines
309 B
JavaScript

'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);