mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-30 00:06:59 -04:00
14 lines
256 B
JavaScript
14 lines
256 B
JavaScript
console.log('load time.mjs');
|
|
let time;
|
|
export function getTime() {
|
|
if (!time) {
|
|
throw new Error('no time set! use setTime to define a time source');
|
|
}
|
|
return time();
|
|
}
|
|
|
|
export function setTime(func) {
|
|
console.log('setTime!');
|
|
time = func;
|
|
}
|