make affection strict
This commit is contained in:
parent
e81408e54f
commit
4a5cc6d0e0
1 changed files with 3 additions and 3 deletions
|
@ -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