Add cancelTimer method.