tickTime = do
  timeStateRef' <- view (env.monadTimeStateRef)
  timeNow <- Time.time
  liftIO $ modifyIORef' timeStateRef' (tickTimeState timeNow)

tickTimeState :: Seconds -> MonadTimeState -> MonadTimeState
tickTimeState timeNow ts =
  ts & previousTime .~ (ts ^. currentTime)
     & currentTime .~ timeNow

deltaTime ::
  ( MonadReader r m
  , HasEnv r
  , MonadIO m