init counter-with-rtimer
modified compile error of counter-with-rtimer