Add test cases for timer

Fixed a6c530134e97f6e555fea2fff27efd5d399e0902