write a timer component