44 |
|
*/ |
45 |
|
private volatile boolean executeExistingDelayedTasksAfterShutdown = true; |
46 |
|
|
47 |
– |
|
47 |
|
/** |
48 |
|
* Sequence number to break scheduling ties, and in turn to |
49 |
|
* guarantee FIFO order among tied entries. |
56 |
|
/** |
57 |
|
* Return nanosecond time offset by origin |
58 |
|
*/ |
59 |
< |
private long now() { |
59 |
> |
final long now() { |
60 |
|
return System.nanoTime() - NANO_ORIGIN; |
61 |
|
} |
62 |
|
|
134 |
|
} |
135 |
|
|
136 |
|
/** |
138 |
– |
* Returns the period, or zero if non-periodic. |
139 |
– |
* |
140 |
– |
* @return the period |
141 |
– |
*/ |
142 |
– |
long getPeriod(TimeUnit unit) { |
143 |
– |
return unit.convert(period, TimeUnit.NANOSECONDS); |
144 |
– |
} |
145 |
– |
|
146 |
– |
/** |
137 |
|
* Run a periodic task |
138 |
|
*/ |
139 |
|
private void runPeriodic() { |