Example usage for io.netty.util.concurrent AbstractScheduledEventExecutor nanoTime

List of usage examples for io.netty.util.concurrent AbstractScheduledEventExecutor nanoTime

Introduction

In this page you can find the example usage for io.netty.util.concurrent AbstractScheduledEventExecutor nanoTime.

Prototype

protected static long nanoTime() 

Source Link

Usage

From source file:cz.znj.kvr.sw.exp.java.netty.netty.MyEmbeddedEventLoop.java

License:Apache License

long runScheduledTasks() {
    long time = AbstractScheduledEventExecutor.nanoTime();
    for (;;) {/*from   w  w  w. j a  v  a2  s .c  o m*/
        Runnable task = pollScheduledTask(time);
        if (task == null) {
            return nextScheduledTaskNano();
        }

        task.run();
    }
}