Throttle function execution based on cpu time used.