Implement HAL RT counter