From ff2561043aa7667376921dd6a8d15d2c27c589c7 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Wed, 18 May 2022 16:43:05 +0200 Subject: [PATCH] stdlib and timelib bugs fixed --- std.isbpl | 6 +++--- time.isbpl | 23 +++++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/std.isbpl b/std.isbpl index 0ae8eb4..6546c13 100644 --- a/std.isbpl +++ b/std.isbpl @@ -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 { diff --git a/time.isbpl b/time.isbpl index b50d6ee..76a2bf3 100644 --- a/time.isbpl +++ b/time.isbpl @@ -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