clean algo (work for all tests)
This commit is contained in:
32
readme.md
32
readme.md
@@ -13,30 +13,28 @@
|
||||
@startuml
|
||||
|
||||
start
|
||||
:rTime = 0
|
||||
relInterval = 0
|
||||
:newTime = 0
|
||||
totalTime = 0
|
||||
isEnd = it == list.end()
|
||||
lTime = 0;
|
||||
if (!isEnd) then (not end)
|
||||
:relInterval = it.getRelTicks()
|
||||
rTime += relInterval;
|
||||
lastTime = 0;
|
||||
|
||||
while ( !isEnd && ( relInterval <= 0 || (rTime < dTime) ) is (goForward)
|
||||
#tomato:if (!isEnd) then (not end)
|
||||
#tomato:totalTime += it.getRelTicks();
|
||||
endif
|
||||
|
||||
while ( !isEnd && (totalTime <= newTime) ) is (goForward)
|
||||
:isEnd = (++it == list.end());
|
||||
if (!isEnd) then (not end)
|
||||
:relInterval = it.getRelTicks()
|
||||
lTime = rTime
|
||||
rTime += relInterval;
|
||||
:lastTime = totalTime;
|
||||
#tomato:if (!isEnd) then (not end)
|
||||
#tomato:totalTime += it.getRelTicks();
|
||||
endif
|
||||
endwhile
|
||||
|
||||
#tomato:if (!isEnd) then (not end)
|
||||
#tomato:subRelTicks(newTime- lastTime);
|
||||
endif
|
||||
if (!isEnd) then (not end)
|
||||
: subRelTicks(dTime- lTime);
|
||||
endif
|
||||
:it.setRelTicks(dTime - rTime);
|
||||
:insert(it, timeout);
|
||||
|
||||
:it.setRelTicks(newTime - lastTime);
|
||||
:insert(it, newTimeout);
|
||||
|
||||
@enduml
|
||||
|
||||
|
||||
Reference in New Issue
Block a user