summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2015-11-01 11:55:01 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2015-11-01 11:55:01 -0500
commit3cf49898acbf6701b04a1de4938241f1009c5e5a (patch)
tree029b7822e16333e345fa5948fb57c9eb8846afa7 /lib
parent0746eb28c54cb2ba778150e9fd8d0c399f7dcd14 (diff)
Basis.fromMilliseconds
Diffstat (limited to 'lib')
-rw-r--r--lib/js/urweb.js4
-rw-r--r--lib/ur/basis.urs1
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js
index 335cb525..ac4e4c9e 100644
--- a/lib/js/urweb.js
+++ b/lib/js/urweb.js
@@ -149,6 +149,10 @@ function toMilliseconds(tm) {
return Math.round(tm / 1000);
}
+function fromMilliseconds(tm) {
+ return tm * 1000;
+}
+
function addSeconds(tm, n) {
return tm + n * 1000000;
}
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index ec6ef599..e4eaa0a9 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -163,6 +163,7 @@ val toSeconds : time -> int
val diffInSeconds : time -> time -> int
(* Earlier time first *)
val toMilliseconds : time -> int
+val fromMilliseconds : int -> time
val diffInMilliseconds : time -> time -> int
val timef : string -> time -> string (* Uses strftime() format string *)
val readUtc : string -> option time