diff lib/js/urweb.js @ 1685:225b87d4a7df

Basis.toMilliseconds and diffInMilliseconds, based on a patch from Gergely Buday
author Adam Chlipala <adam@chlipala.net>
date Sat, 04 Feb 2012 11:01:06 -0500
parents e8a84494d2c0
children ea292bf9431f
line wrap: on
line diff
--- a/lib/js/urweb.js	Sat Feb 04 10:42:18 2012 -0500
+++ b/lib/js/urweb.js	Sat Feb 04 11:01:06 2012 -0500
@@ -132,10 +132,18 @@
     return Math.round((tm2 - tm1) / 1000000);
 }
 
+function diffInMilliseconds(tm1, tm2) {
+    return Math.round((tm2 - tm1) / 1000);
+}
+
 function toSeconds(tm) {
     return Math.round(tm / 1000000);
 }
 
+function toMilliseconds(tm) {
+    return Math.round(tm / 1000);
+}
+
 function addSeconds(tm, n) {
     return tm + n * 1000000;
 }