fixed compile errors in timer.c