Mercurial > gui
annotate timer.ur @ 33:2e7f8f7d71d4
Update for Ur/Web's new tag name resolution
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 21 Nov 2013 16:12:17 -0500 |
parents | 37eefd0a2ed4 |
children |
rev | line source |
---|---|
adam@0 | 1 type t = source bool |
adam@0 | 2 |
adam@0 | 3 fun create r = |
adam@0 | 4 b <- source False; |
adam@0 | 5 spawn (sleep r.Milliseconds; |
adam@0 | 6 b <- get b; |
adam@0 | 7 if b then |
adam@0 | 8 return () |
adam@0 | 9 else |
adam@0 | 10 r.Action); |
adam@0 | 11 return b |
adam@0 | 12 |
adam@0 | 13 fun cancel b = set b True |