diff options
author | 2012-02-04 11:01:06 -0500 | |
---|---|---|
committer | 2012-02-04 11:01:06 -0500 | |
commit | e0e4f3c3978c8cf18f6e2c11203051c2ef4d4a68 (patch) | |
tree | e85b1d872c1f40a0b7ba471cf80d0787e65c7eb7 /tests/millis.ur | |
parent | 08e55a0472abe5a5464996402c398517422514fd (diff) |
Basis.toMilliseconds and diffInMilliseconds, based on a patch from Gergely Buday
Diffstat (limited to 'tests/millis.ur')
-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> |