MCPcopy Create free account
hub / github.com/ebarlas/microhttp / schedule

Method schedule

src/main/java/org/microhttp/Scheduler.java:35–39  ·  view source on GitHub ↗
(Runnable task, Duration duration)

Source from the content-addressed store, hash-verified

33 }
34
35 Cancellable schedule(Runnable task, Duration duration) {
36 Task t = new Task(task, clock.nanoTime() + duration.toNanos(), counter++);
37 tasks.add(t);
38 return t;
39 }
40
41 List<Runnable> expired() {
42 long time = clock.nanoTime();

Callers 4

cancelAndRescheduleMethod · 0.95
ConnectionMethod · 0.80
doOnWritableMethod · 0.80

Calls 2

nanoTimeMethod · 0.65
addMethod · 0.45

Tested by 2

cancelAndRescheduleMethod · 0.76