diff --git a/ui/src/components/Clock.vue b/ui/src/components/Clock.vue index a2a2dc1..d20b384 100644 --- a/ui/src/components/Clock.vue +++ b/ui/src/components/Clock.vue @@ -14,12 +14,15 @@ export default class Clock extends Vue { @Prop() public format!: string; + private update(): void { + this.formatted = DateTime.now() + .setLocale(navigator.language) + .toFormat(this.format); + } + public created(): void { - this.interval = setInterval((): void => { - this.formatted = DateTime.now() - .setLocale(navigator.language) - .toFormat(this.format); - }, 1000); + this.update(); + this.interval = setInterval(this.update, 10000); } public beforeDestroy(): void {