configurable critical sections for timers