time based functions and debug controls