-- GLUT Timer callbacks are one-shot, so re-register each time.  We can re-register
-- first, so try keeping the display rate constant, or re-register second to keep
-- delay constant.  Also, turn off the vsync stuff.


-- | Run an animated shader
runAnim :: Sink Action -> Sink R1 -> IO ()
runAnim start sinkU =
  do t0 <- time
     start (subtract t0 <$> time >>= sinkU)

-- runAnim sinkU = callback (time >>= sinkU) >> mainLoop


-- Get the time since midnight, in seconds
runAnim :: Sink Action -> Sink R1 -> IO ()
runAnim start sinkU =
  do t0 <- time
     start (subtract t0 <$> time >>= sinkU)

-- runAnim sinkU = callback (time >>= sinkU) >> mainLoop


-- Get the time since midnight, in seconds
runAnim start sinkU =
  do t0 <- time
     start (subtract t0 <$> time >>= sinkU)

-- runAnim sinkU = callback (time >>= sinkU) >> mainLoop


-- Get the time since midnight, in seconds