aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/js')
-rw-r--r--lib/js/urweb.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 35a62d76..272ba32b 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -93,6 +93,19 @@ function length(ls) {
}
+// Time
+
+function showTime(tm) {
+ var newDate = new Date();
+ newDate.setTime(tm / 1000);
+ return newDate.toUTCString();
+}
+
+function now() {
+ return (new Date()).getTime() * 1000;
+}
+
+
// Error handling
function whine(msg) {