summaryrefslogtreecommitdiff
path: root/tests/millis.ur
blob: 0ba22b9fa81adc93765b1cbe05c1c37b971cfacf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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>