props.origin
This commit is contained in:
parent
a20f8f25a4
commit
16ebe56bed
|
@ -49,7 +49,7 @@ const relative = $computed<string>(() => {
|
|||
let tickId: number;
|
||||
|
||||
function tick() {
|
||||
const _now = (new Date()).getTime();
|
||||
const _now = (props.origin ?? new Date()).getTime()
|
||||
const ago = (_now - _time) / 1000/*ms*/;
|
||||
const next = ago < 60 ? 10000 : ago < 3600 ? 60000 : 180000;
|
||||
|
||||
|
|
Loading…
Reference in New Issue