implement interrupt sync

This commit is contained in:
2023-07-14 21:48:06 +00:00
parent f37f7cd142
commit a48f641ab5
5 changed files with 207 additions and 20 deletions

View File

@@ -99,3 +99,7 @@ export function getObjectHash (object, alg = "sha256", format = "hex") {
hash.update(JSON.stringify(object, Object.keys(object).sort()));
return hash.digest(format);
}
export function getTimeLeft (timeout) {
return Math.ceil((timeout._idleStart + timeout._idleTimeout - (global.process.uptime() * 1000)));
}