public ScheduledFuture < ? > runOnExpiration ( Runnable task , ScheduledExecutorService scheduler ) { checkNotNull ( task , "task" ) ; checkNotNull ( scheduler , "scheduler" ) ; return scheduler . schedule ( task , deadlineNanos - ticker . read ( ) , TimeUnit . NANOSECONDS ) ; }
Schedule a task to be run when the deadline expires .