Function waitForMeasureTime

Returns a Promise that is resolved as soon as possible after the next repaint.