implement timer and add unittest test