clean algo (work for all tests)

This commit is contained in:
2023-10-21 15:42:56 +02:00
parent 20fd0631c6
commit 05f186188f
2 changed files with 26 additions and 36 deletions

View File

@@ -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