3 import StdFunc => qualified return
7 import iTasks.Internal.IWorld
9 Start w = flip startEngine w
12 -|| viewInformation () [] (toString i +++ "th waitForSTimer")
15 waitForSTimer :: Real -> Task ()
16 waitForSTimer secondsToWait
18 >>= \ts->watch (sdsFocus {start=ts,interval=realToTs secondsToWait} iworldTimespec)
19 >>* [OnValue (ifValue (\t->t > ts+realToTs secondsToWait) \_->treturn ())]
21 realToTs :: Real -> Timespec
24 ,tv_nsec = toInt $ (t - toReal (floor t)) * 1E9
28 | toReal (toInt x) == x = (toInt x)
29 | otherwise = toInt (x - 0.5)