Implement async threshold

It spans long executions over several frames by measuring the execution
time and request a new frame when going past the threshold.