]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/Debug.scl
Use Logger in Debug.scl timing-functions
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Debug.scl
index ba0c7baa9a30f8d96b8391bc066629423ef024b3..7ccad037e2ad9629528a6339096d494b633044cf 100644 (file)
@@ -1,6 +1,8 @@
 import "Prelude"
 import "JavaBuiltin" as Java
 
+import "Logging" as LOGGER
+
 importJava "java.lang.System" where
     nanoTime :: () -> <Proc> 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 -> (<e> a) -> <e> 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