Mercurial > urweb
annotate tests/millis.ur @ 1924:b44138e6a3bf
Add activeHead tag.
activeHead is similar to active but produces xhead instead of xbody
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Fri, 06 Dec 2013 13:59:39 +0400 |
parents | 225b87d4a7df |
children |
rev | line source |
---|---|
adam@1685 | 1 fun diffThem tm = |
adam@1685 | 2 tm' <- now; |
adam@1685 | 3 return <xml><body> |
adam@1685 | 4 Diff: {[diffInMilliseconds tm tm']} |
adam@1685 | 5 </body></xml> |
adam@1685 | 6 |
adam@1685 | 7 fun main () : transaction page = |
adam@1685 | 8 tm <- now; |
adam@1685 | 9 |
adam@1685 | 10 return <xml><body> |
adam@1685 | 11 Now: {[toMilliseconds tm]}<br/> |
adam@1685 | 12 <a link={diffThem tm}>Diff</a><br/> |
adam@1685 | 13 |
adam@1685 | 14 <button onclick={tm' <- now; |
adam@1685 | 15 alert ("Now: " ^ show (toMilliseconds tm')); |
adam@1685 | 16 alert ("Diff: " ^ show (diffInMilliseconds tm tm'))}/> |
adam@1685 | 17 </body></xml> |