mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-13 22:58:34 +00: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;
|
|
}
|