faster
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@514 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
fed11f4a95
commit
1ae9b9408c
12 changed files with 81 additions and 32 deletions
|
|
@ -292,7 +292,7 @@ void MwLoop(MwWidget handle) {
|
|||
long wait = MwGetInteger(handle, MwNwaitMS);
|
||||
if(wait == MwDEFAULT) wait = MwWaitMS;
|
||||
while(!handle->close) {
|
||||
int v = 0;
|
||||
int v = 0;
|
||||
long t, t2;
|
||||
while(MwPending(handle)) {
|
||||
if((v = MwStep(handle)) != 0) break;
|
||||
|
|
@ -304,10 +304,10 @@ void MwLoop(MwWidget handle) {
|
|||
}
|
||||
|
||||
t = (tick + wait) - (t2 = MwLLGetTick());
|
||||
if(t > 0){
|
||||
if(t > 0) {
|
||||
MwLLSleep(t);
|
||||
tick += wait;
|
||||
}else{
|
||||
} else {
|
||||
tick = t2;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue