diff options
author | Adam Chlipala <adam@chlipala.net> | 2012-02-04 11:01:06 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2012-02-04 11:01:06 -0500 |
commit | 09c2534e57944a9b5d6cc8971d0733d25749ade5 (patch) | |
tree | e85b1d872c1f40a0b7ba471cf80d0787e65c7eb7 /tests | |
parent | 36603eae600143253959ad94cdc5bb75a766b91c (diff) |
Basis.toMilliseconds and diffInMilliseconds, based on a patch from Gergely Buday
Diffstat (limited to 'tests')
-rw-r--r-- | tests/millis.ur | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/millis.ur b/tests/millis.ur new file mode 100644 index 00000000..0ba22b9f --- /dev/null +++ b/tests/millis.ur @@ -0,0 +1,17 @@ +fun diffThem tm = + tm' <- now; + return <xml><body> + Diff: {[diffInMilliseconds tm tm']} + </body></xml> + +fun main () : transaction page = + tm <- now; + + return <xml><body> + Now: {[toMilliseconds tm]}<br/> + <a link={diffThem tm}>Diff</a><br/> + + <button onclick={tm' <- now; + alert ("Now: " ^ show (toMilliseconds tm')); + alert ("Diff: " ^ show (diffInMilliseconds tm tm'))}/> + </body></xml> |