Add timer and counter implementation