From: jsimomaa Date: Wed, 28 Feb 2018 12:11:05 +0000 (+0200) Subject: Use Logger in Debug.scl timing-functions X-Git-Tag: v1.43.0~136^2~570 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F16%2F1516%2F2;p=simantics%2Fplatform.git Use Logger in Debug.scl timing-functions refs #7791 Change-Id: Ib2b27db232cf91052b1880d41f4e3f6ed9897f77 --- diff --git a/bundles/org.simantics.scl.runtime/scl/Debug.scl b/bundles/org.simantics.scl.runtime/scl/Debug.scl index ba0c7baa9..7ccad037e 100644 --- a/bundles/org.simantics.scl.runtime/scl/Debug.scl +++ b/bundles/org.simantics.scl.runtime/scl/Debug.scl @@ -1,6 +1,8 @@ import "Prelude" import "JavaBuiltin" as Java +import "Logging" as LOGGER + importJava "java.lang.System" where nanoTime :: () -> Long @@ -21,7 +23,7 @@ reportTime f = runProc do result = f endTime = nanoTime () time = Java.l2d (endTime-beginTime) * 1e-9 - print "time \(time) s" + LOGGER.info "time \(time) s" result reportTimeM :: String -> ( a) -> a @@ -30,8 +32,8 @@ reportTimeM task f = runProc do result = f endTime = nanoTime () time = Java.l2d (endTime-beginTime) * 1e-9 - print "\(task): \(time) s" - result + LOGGER.info "\(task): \(time) s" + result """ Prints the given text and returns