src/js/utils.js
branchpopcorn-port
changeset 256 8e1181b855bd
parent 254 cafaa694b709
child 285 b7aa28af2c10
--- a/src/js/utils.js	Wed Nov 16 12:30:04 2011 +0100
+++ b/src/js/utils.js	Wed Nov 16 16:06:18 2011 +0100
@@ -31,6 +31,13 @@
 	return Math.floor((time/timetotal) * 100);
 };
 
+IriSP.padWithZeros = function(num) {
+  if (Math.abs(num) < 10) {
+    return "0" + num.toString();
+  } else {
+    return num.toString();
+  }
+};
 /* convert a number of seconds to a tuple of the form 
    [hours, minutes, seconds]
 */