public class IoTimeBudget extends Object
IoTimeBudget values is nanoseconds.| Constructor and Description |
|---|
IoTimeBudget() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Set the budget to 0 (for all levels).
|
long |
estimateTimeLeft(int level)
Returns how much time is left for the specified priority level.
|
void |
reset(long[] partialBudget)
(Re-)initialize the IO time budget, that is, the time that can be spent
in blocking IO.
|
long |
timeLeft(int level)
Returns how much time is left for the specified priority level.
|
void |
use(long t,
int level)
Use the specified amount of time of the specified level.
|
public void reset(long[] partialBudget)
partialBudget - Initial budget for priority levels 0 through
n. The budget for level i>j must always
be smaller-equal the budget for level j.public void clear()
public long timeLeft(int level)
level - priority level. must be greater ≥ 0.public void use(long t,
int level)
t is subtracted from the budgets of level level and
smaller. If by this, the remaining budget of level becomes
smaller than the remaining budget of level + 1, then this is
reduced too. (And the same for higher levels.)t - how much time to use.level - priority level. must be greater ≥ 0.public long estimateTimeLeft(int level)
level - priority level. must be greater ≥ 0.Copyright © 2015–2022 ImgLib2. All rights reserved.