make affection strict
This commit is contained in:
parent
e3c3caec0b
commit
bbf2cc9911
1 changed files with 3 additions and 3 deletions
6
extern/affection/src/Affection.hs
vendored
6
extern/affection/src/Affection.hs
vendored
|
@ -1,5 +1,5 @@
|
|||
{-# LANGUAGE RecordWildCards #-}
|
||||
{-# LANGUAGE BangPatterns #-}
|
||||
{-# LANGUAGE Strict #-}
|
||||
{-# LANGUAGE ExplicitForAll #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE RankNTypes #-}
|
||||
|
@ -111,9 +111,9 @@ withAffection AffectionConfig{..} = do
|
|||
now <- liftIO $ getTime Monotonic
|
||||
let lastTime = sysTime ad
|
||||
-- compute dt and update elapsedTime
|
||||
let !dt = fromIntegral
|
||||
let dt = fromIntegral
|
||||
(toNanoSecs $ diffTimeSpec lastTime now) / (10 ^ (9 :: Int))
|
||||
!ne = elapsedTime ad + dt
|
||||
ne = elapsedTime ad + dt
|
||||
-- update state data object with new time values
|
||||
put $ ad
|
||||
{ elapsedTime = ne
|
||||
|
|
Loading…
Reference in a new issue