summaryrefslogtreecommitdiff
path: root/TimeKeeper.hs
diff options
context:
space:
mode:
authorJoe Crayne <joe@jerkface.net>2019-04-22 03:13:44 -0400
committerJoe Crayne <joe@jerkface.net>2019-04-22 03:36:23 -0400
commitac89ee199abfe893b03cdbb89a426cd0594e06c9 (patch)
treec3542c880eb610e9a2d5d863ec9ba518a32a0b02 /TimeKeeper.hs
parent36bd8e7133eca5d4e04252c555ee0cc2cc78106e (diff)
objdemo: pass view matrix from haskell.
Diffstat (limited to 'TimeKeeper.hs')
-rw-r--r--TimeKeeper.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/TimeKeeper.hs b/TimeKeeper.hs
index d85f61f..36e7e8a 100644
--- a/TimeKeeper.hs
+++ b/TimeKeeper.hs
@@ -24,6 +24,9 @@ newTimeKeeper = do
24 ff <- newMVar 0 24 ff <- newMVar 0
25 return $ TimeKeeper s ff 25 return $ TimeKeeper s ff
26 26
27getSeconds :: TimeKeeper -> IO Double
28getSeconds tk = readMVar (tmSeconds tk)
29
27tick :: TimeKeeper -> Widget -> FrameClock -> IO Bool 30tick :: TimeKeeper -> Widget -> FrameClock -> IO Bool
28tick tm widget clock = widgetGetWindow widget >>= \case 31tick tm widget clock = widgetGetWindow widget >>= \case
29 Nothing -> return SOURCE_REMOVE 32 Nothing -> return SOURCE_REMOVE