Code example for TimeUnit

Methods: toMillis

0
this.sched = sched;
        this.id = id;
        this.owner = owner;
        this.task = task;
        this.delay = unit.toMillis( delay );
        this.period = unit.toMillis( period );
    } 
 
    @Override 
    public void cancel() 
    { 
        running.set( false );
    } 
 
    @Override 
    public void run() 
    { 
        if ( delay > 0 )
        { 
            try