comparison tests/millis.ur @ 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
children
comparison
equal deleted inserted replaced
1684:9dd8d47c3e58 1685:225b87d4a7df
1 fun diffThem tm =
2 tm' <- now;
3 return <xml><body>
4 Diff: {[diffInMilliseconds tm tm']}
5 </body></xml>
6
7 fun main () : transaction page =
8 tm <- now;
9
10 return <xml><body>
11 Now: {[toMilliseconds tm]}<br/>
12 <a link={diffThem tm}>Diff</a><br/>
13
14 <button onclick={tm' <- now;
15 alert ("Now: " ^ show (toMilliseconds tm'));
16 alert ("Diff: " ^ show (diffInMilliseconds tm tm'))}/>
17 </body></xml>