Java Duration Calculate sleep(final Duration duration)

Here you can find the source of sleep(final Duration duration)

Description

TODO: Documentation

License

Open Source License

Declaration

public static void sleep(final Duration duration) 

Method Source Code


//package com.java2s;

import java.time.Duration;

public class Main {
    /** TODO: Documentation */
    public static void sleep(final Duration duration) {
        try {//w ww. j  a v  a  2 s.  c  om
            Thread.sleep(duration.toMillis());
        } catch (final InterruptedException e) {
            e.printStackTrace();
        }
    }
}

Related

  1. multiply(Duration duration, double factor)
  2. runAfter(Duration duration, Runnable toRun)
  3. seconds(Duration duration)
  4. serializeDuration(Duration duration)
  5. sleep(Duration duration)
  6. within( CompletableFuture future, Duration duration)