src/js/utils.js
branchpopcorn-port
changeset 99 912f100fecb0
parent 78 d77fe3283530
child 103 2dfd89e91c3a
--- a/src/js/utils.js	Wed Oct 19 15:00:34 2011 +0200
+++ b/src/js/utils.js	Thu Oct 20 10:19:00 2011 +0200
@@ -23,6 +23,11 @@
   }
 }
 
+/* convert a time to a percentage in the media */
+IriSP.timeToPourcent = function(time,timetotal){
+	return (parseInt(Math.round(time/timetotal*100)));
+};
+
 /* for ie compatibility
 if (Object.prototype.__defineGetter__&&!Object.defineProperty) {
    Object.defineProperty=function(obj,prop,desc) {