API reference › @evolu/nodejs › NodejsTime
Defined in: packages/nodejs/src/Time.ts:16
Time with Node.js high-resolution nanosecond readings.
Extends
Properties
clearTimeout
readonly clearTimeout: (id: TimeoutId) => void;
Defined in: packages/common/dist/src/Time.d.ts:38
Cancels a timeout scheduled with this instance's Time.setTimeout.
Throws if the timeout was scheduled by another Time instance.
Inherited from
hrtime
readonly hrtime: () => HrTime;
Defined in: packages/nodejs/src/Time.ts:18
Returns a monotonic high-resolution timestamp in nanoseconds.
now
readonly now: {
(): number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative"> & Brand<"LessThan281474976710655"> & Brand<"Millis">;
(type: "DateIso"): string & Brand<"DateIso">;
};
Defined in: packages/common/dist/src/Time.d.ts:10
Call Signature
(): number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative"> & Brand<"LessThan281474976710655"> & Brand<"Millis">;
Returns current time as Unix epoch milliseconds.
Returns
number & Brand<"NonNaN"> & Brand<"Finite"> & Brand<"Int"> & Brand<"NonNegative"> & Brand<"LessThan281474976710655"> & Brand<"Millis">
Call Signature
(type: "DateIso"): string & Brand<"DateIso">;
Returns current time as an ISO 8601 UTC string.
Parameters
| Parameter | Type |
|---|---|
type | "DateIso" |
Returns
string & Brand<"DateIso">
Inherited from
performance
readonly performance: {
now: () => PerformanceTime;
timeOrigin: PerformanceTimeOrigin;
};
Defined in: packages/common/dist/src/Time.d.ts:16
| Name | Type | Description | Defined in |
|---|---|---|---|
now() | () => PerformanceTime | Returns a high-resolution timestamp in milliseconds relative to performance.timeOrigin. Unlike Time.now, this value is not Unix epoch time and is unaffected by system clock adjustments. Like Node.js process.hrtime.bigint(), it is suitable for measuring elapsed time, but it uses the Web Performance API's number representation rather than nanoseconds as a bigint. | packages/common/dist/src/Time.d.ts:29 |
timeOrigin | PerformanceTimeOrigin | Unix epoch timestamp used as the origin for performance.now(). | packages/common/dist/src/Time.d.ts:18 |
Inherited from
setTimeout
readonly setTimeout: (fn: () => void, delay: PositiveDuration) => TimeoutId;
Defined in: packages/common/dist/src/Time.d.ts:32
Schedules a callback after the specified positive delay.