Added timer
This commit is contained in:
parent
4d8742061c
commit
7540960565
1 changed files with 26 additions and 0 deletions
26
time.isbpl
26
time.isbpl
|
@ -15,3 +15,29 @@ func delay {
|
|||
func delays {
|
||||
1000 * time pop
|
||||
}
|
||||
|
||||
def Timer
|
||||
construct Timer {
|
||||
startMS
|
||||
stopMS
|
||||
timeTakenTMP
|
||||
;
|
||||
start {
|
||||
getms =startMS
|
||||
null =timeTakenTMP
|
||||
}
|
||||
stop {
|
||||
getms =stopMS
|
||||
null =timeTakenTMP
|
||||
}
|
||||
timeTaken {
|
||||
timeTakenTMP if {
|
||||
timeTakenTMP 2 stop
|
||||
}
|
||||
startMS stopMS eq if {
|
||||
0 dup =timeTakenTMP
|
||||
2 stop
|
||||
}
|
||||
stopMS startMS - dup =timeTakenTMP
|
||||
}
|
||||
} =Timer
|
||||
|
|
Loading…
Add table
Reference in a new issue