stdlib and timelib bugs fixed

This commit is contained in:
Daniella / Tove 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 isfloat if {
object ftoi =object
object ftos =object
}
object islong if {
object ltoi =object
object ltos =object
}
object isdouble if {
object dtoi =object
object dtos =object
}
object isarray if {

View file

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