Add CompletableFuture version of thread switching code, change to
System.nanoTime() (no impact, but probably better to use in any case).