import { writable, type Readable } from "svelte/store"; const currentTimeWritable = writable(new Date()); setInterval(() => { currentTimeWritable.set(new Date()); }, 15000); /** * A readable store that is updated twice every minute with the current time. Mainly for the progress * bar timers, but other coarse-grained timers could use it as well. */ const currentTime: Readable = { subscribe: currentTimeWritable.subscribe } export default currentTime;