diff labelTask.m @ 148:1f5f988e9682

Added functions for printing and timing tasks in a script.
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 05 Apr 2016 11:26:04 +0200
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/labelTask.m	Tue Apr 05 11:26:04 2016 +0200
@@ -0,0 +1,12 @@
+function o = labelTask(in)
+
+    switch class(in)
+        case 'char'
+            fprintf(in);
+            o = tic();
+        case 'uint64'
+            o = toc(in);
+            fprintf(' - done %fs\n', o);
+        otherwise
+            error('Unknow input type: %s', class(in))
+    end