mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-08 06:48:04 +03:00
add hrtime utils
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Takes a process.hrtime.bigint(), and returns the miliseconds elapsed since it.
|
||||
* This function will not work if more than 100(ish) days have passed since the first reference.
|
||||
*/
|
||||
export function GetMilisecondsSince(ref: bigint) {
|
||||
return Number(process.hrtime.bigint() - ref) / 1e6;
|
||||
}
|
||||
Reference in New Issue
Block a user