From 53ed96e828ad57679b6933ebde323b7869191c94 Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Wed, 28 Feb 2018 14:11:05 +0200 Subject: [PATCH] Use Logger in Debug.scl timing-functions refs #7791 Change-Id: Ib2b27db232cf91052b1880d41f4e3f6ed9897f77 --- bundles/org.simantics.scl.runtime/scl/Debug.scl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 -- 2.43.2