added api for timer