1
This commit is contained in:
parent
1fe3f046e7
commit
7cfe69fdcd
19
Timer.java
19
Timer.java
@ -47,8 +47,11 @@ public class Timer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int TVN_SIZE = 1 << 6;
|
private static final boolean CONFIG_BASE_SMALL = false;
|
||||||
private static final int TVR_SIZE = 1 << 8;
|
private static final int TVN_BITS = CONFIG_BASE_SMALL ? 4 : 6;
|
||||||
|
private static final int TVR_BITS = CONFIG_BASE_SMALL ? 6 : 8;
|
||||||
|
private static final int TVN_SIZE = 1 << TVN_BITS;
|
||||||
|
private static final int TVR_SIZE = 1 << TVR_BITS;
|
||||||
private static final int TVN_MASK = TVN_SIZE - 1;
|
private static final int TVN_MASK = TVN_SIZE - 1;
|
||||||
private static final int TVR_MASK = TVR_SIZE - 1;
|
private static final int TVR_MASK = TVR_SIZE - 1;
|
||||||
|
|
||||||
@ -82,6 +85,14 @@ public class Timer {
|
|||||||
while (getTickCount.GetTickCount(content) >= timerTick) {
|
while (getTickCount.GetTickCount(content) >= timerTick) {
|
||||||
int index = (int)(timerTick & TVR_MASK);
|
int index = (int)(timerTick & TVR_MASK);
|
||||||
|
|
||||||
|
if (index == 0 &&
|
||||||
|
cascade(tv2, (int)((timerTick >> (TVR_BITS + 0 * TVN_BITS)) & TVN_MASK)) == 0 &&
|
||||||
|
cascade(tv3, (int)((timerTick >> (TVR_BITS + 1 * TVN_BITS)) & TVN_MASK)) == 0 &&
|
||||||
|
cascade(tv4, (int)((timerTick >> (TVR_BITS + 2 * TVN_BITS)) & TVN_MASK)) == 0
|
||||||
|
) {
|
||||||
|
cascade(tv5, (int)((timerTick >> (TVR_BITS + 3 * TVN_BITS)) & TVN_MASK));
|
||||||
|
}
|
||||||
|
|
||||||
++timerTick;
|
++timerTick;
|
||||||
tv1[index].replaceInit(workList);
|
tv1[index].replaceInit(workList);
|
||||||
while (!workList.empty()) {
|
while (!workList.empty()) {
|
||||||
@ -215,4 +226,8 @@ public class Timer {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private int cascade(ListHead[] tv, int index) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user