private void startFadeout( @NotNull final Runnable delayedAction ) {
new Thread( new Runnable() {
@Override
public void run() {
final RedrawJob drawJob;
synchronized (GameHolder.this) {
drawJob = GameHolder.this.redrawer;
}
if ( drawJob != null ) {
final long time = drawJob.startFadeOut();
try {
Thread.sleep( Math.max( 0, time - BEFORE_FADEOUT_END_VIEW_SWITCH ) );
} catch ( InterruptedException ignored ) {}
}