This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
XF/UML/timeAlgorithme.puml

27 lines
574 B
Plaintext
Raw Permalink Normal View History

@startuml
start
:newTime = 0
totalTime = 0
isEnd = it == list.end()
lastTime = 0;
#tomato:if (!isEnd) then (not end)
#tomato:totalTime += it.getRelTicks();
endif
while ( !isEnd && (totalTime <= newTime) ) is (goForward)
:isEnd = (++it == list.end());
: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
:it.setRelTicks(newTime - lastTime);
:insert(it, newTimeout);
@enduml