@@ -1159,6 +1159,9 @@ added: v0.7.6
1159
1159
* ` time ` {integer[ ] } The result of a previous call to ` process.hrtime() `
1160
1160
* Returns: {integer[ ] }
1161
1161
1162
+ This is the legacy version of [ ` process.hrtime.bigint() ` ] [ ]
1163
+ before ` bigint ` was introduced in JavaScript.
1164
+
1162
1165
The ` process.hrtime() ` method returns the current high-resolution real time
1163
1166
in a ` [seconds, nanoseconds] ` tuple ` Array ` , where ` nanoseconds ` is the
1164
1167
remaining part of the real time that can't be represented in second precision.
@@ -1199,7 +1202,7 @@ current high-resolution real time in a `bigint`.
1199
1202
1200
1203
Unlike [ ` process.hrtime() ` ] [ ] , it does not support an additional ` time `
1201
1204
argument since the difference can just be computed directly
1202
- by substraction of the two ` bigint ` s.
1205
+ by subtraction of the two ` bigint ` s.
1203
1206
1204
1207
``` js
1205
1208
const start = process .hrtime .bigint ();
@@ -1210,7 +1213,7 @@ setTimeout(() => {
1210
1213
// 191052633396993n
1211
1214
1212
1215
console .log (` Benchmark took ${ end - start} nanoseconds` );
1213
- // benchmark took 1154389282 nanoseconds
1216
+ // Benchmark took 1154389282 nanoseconds
1214
1217
}, 1000 );
1215
1218
```
1216
1219
@@ -2058,6 +2061,7 @@ cases:
2058
2061
[ `process.exit()` ] : #process_process_exit_code
2059
2062
[ `process.exitCode` ] : #process_process_exitcode
2060
2063
[ `process.hrtime()` ] : #process_process_hrtime_time
2064
+ [ `process.hrtime.bigint()` ] : #process_process_hrtime_bigint
2061
2065
[ `process.kill()` ] : #process_process_kill_pid_signal
2062
2066
[ `process.setUncaughtExceptionCaptureCallback()` ] : process.html#process_process_setuncaughtexceptioncapturecallback_fn
2063
2067
[ `promise.catch()` ] : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/catch
0 commit comments