props.origin

This commit is contained in:
tamaina 2023-06-09 05:12:16 +00:00
parent a20f8f25a4
commit 16ebe56bed
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ const relative = $computed<string>(() => {
let tickId: number; let tickId: number;
function tick() { function tick() {
const _now = (new Date()).getTime(); const _now = (props.origin ?? new Date()).getTime()
const ago = (_now - _time) / 1000/*ms*/; const ago = (_now - _time) / 1000/*ms*/;
const next = ago < 60 ? 10000 : ago < 3600 ? 60000 : 180000; const next = ago < 60 ? 10000 : ago < 3600 ? 60000 : 180000;