Fix this annoying wart
This commit is contained in:
@@ -24,7 +24,7 @@ public interface Scheduler {
|
|||||||
* @param unit the unit of time for {@code time}
|
* @param unit the unit of time for {@code time}
|
||||||
* @return this builder, for chaining
|
* @return this builder, for chaining
|
||||||
*/
|
*/
|
||||||
TaskBuilder delay(int time, TimeUnit unit);
|
TaskBuilder delay(long time, TimeUnit unit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.
|
* Specifies that the task should continue running after waiting for the specified amount, until it is cancelled.
|
||||||
@@ -32,7 +32,7 @@ public interface Scheduler {
|
|||||||
* @param unit the unit of time for {@code time}
|
* @param unit the unit of time for {@code time}
|
||||||
* @return this builder, for chaining
|
* @return this builder, for chaining
|
||||||
*/
|
*/
|
||||||
TaskBuilder repeat(int time, TimeUnit unit);
|
TaskBuilder repeat(long time, TimeUnit unit);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the delay on this task.
|
* Clears the delay on this task.
|
||||||
|
@@ -65,13 +65,13 @@ public class VelocityScheduler implements Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TaskBuilder delay(int time, TimeUnit unit) {
|
public TaskBuilder delay(long time, TimeUnit unit) {
|
||||||
this.delay = unit.toMillis(time);
|
this.delay = unit.toMillis(time);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TaskBuilder repeat(int time, TimeUnit unit) {
|
public TaskBuilder repeat(long time, TimeUnit unit) {
|
||||||
this.repeat = unit.toMillis(time);
|
this.repeat = unit.toMillis(time);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user