Added the WITH_TIMER flag to activate the appropriate code
Fixes to timer instrumentation