stdlib and timelib bugs fixed

This commit is contained in:
Daniella 2022-05-18 16:43:05 +02:00
parent 73d7323f8c
commit ff2561043a
2 changed files with 16 additions and 13 deletions

View file

@ -179,13 +179,13 @@ func _string {
object itos =object object itos =object
} }
object isfloat if { object isfloat if {
object ftoi =object object ftos =object
} }
object islong if { object islong if {
object ltoi =object object ltos =object
} }
object isdouble if { object isdouble if {
object dtoi =object object dtos =object
} }
object isarray if { object isarray if {

View file

@ -23,21 +23,24 @@ construct Timer {
timeTakenTMP timeTakenTMP
; ;
start { start {
getms =startMS with this ;
null =timeTakenTMP getms this =startMS
null this =timeTakenTMP
} }
stop { end {
getms =stopMS with this ;
null =timeTakenTMP getms this =stopMS
null this =timeTakenTMP
} }
timeTaken { timeTaken {
timeTakenTMP if { with this ;
timeTakenTMP 2 stop this timeTakenTMP null eq not if {
this timeTakenTMP 2 stop
} }
startMS stopMS eq if { this startMS this stopMS eq if {
0 dup =timeTakenTMP 0 dup this =timeTakenTMP
2 stop 2 stop
} }
stopMS startMS - dup =timeTakenTMP this stopMS this startMS - dup this =timeTakenTMP
} }
} =Timer } =Timer