Proper implementation of a timer/stopwatch - SolidJS