<script>
	import { onInterval } from './utils.js';

	export let callback;
	export let interval = 1000;

	onInterval(callback, interval);
</script>

<p>
	This component execute a callback every 
	{interval} millisecond{interval === 1 ? '' : 's'}
</p>

<style>
	p { 
		border: 1px solid blue;
	}
</style>
