some update for test algoritm
This commit is contained in:
29
readme.md
29
readme.md
@@ -9,14 +9,31 @@
|
||||
# Time Algorithm
|
||||
|
||||
```plantuml
|
||||
@startuml
|
||||
(*) --> "relTime = 0" as rt0
|
||||
rt0 --> if goForward then
|
||||
-left--> [false] "insert"
|
||||
else
|
||||
-right--> [true] "do Stuff"
|
||||
|
||||
@startuml
|
||||
|
||||
start
|
||||
:rTime = 0
|
||||
relInterval = 0
|
||||
isEnd = it == list.end();
|
||||
if (!isEnd) then (not end)
|
||||
:relInterval = it.getRelTicks()
|
||||
rTime += relInterval;
|
||||
|
||||
while ( !isEnd && ( relInterval <= 0 || (rTime < dTime) ) is (goForward)
|
||||
:isEnd = (++it == list.end());
|
||||
if (!isEnd) then (not end)
|
||||
:relInterval = it.getRelTicks()
|
||||
rTime += relInterval;
|
||||
endif
|
||||
endwhile
|
||||
|
||||
endif
|
||||
: insert ;
|
||||
|
||||
@enduml
|
||||
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user