init a timer