packages feed

time-manager 0.4.0 → 0.4.1

raw patch · 3 files changed

+11/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,13 @@ # ChangeLog for time-manager +## 0.4.1++* BUGFIX:+  * Fixed a time comparison where a `TimeoutAction` that should be rescheduled+    wasn't. The monotonic time uses nanoseconds and the difference was compared+    to the timeout value without converting to microseconds, so it had a high chance+    of running the `TimeoutAction`, even though it should have been rescheduled.+ ## 0.4.0  * CHANGES IN BEHAVIOUR:
System/TimeManager.hs view
@@ -276,8 +276,8 @@                 ifSameKey key $ do                     lastRenewed <- I.readIORef handleLastRenewed                     now <- getMonotonicTimeNSec-                    let diff = fromIntegral $ now - lastRenewed-                    if diff > handleTimeout+                    let diff = fromIntegral $ (now - lastRenewed) `div` 1_000+                    if diff >= handleTimeout                         -- Valid expiration of the timeout, we run the action                         then do                             -- We're going to run the action, so set the state
time-manager.cabal view
@@ -1,6 +1,6 @@ cabal-version:      >=1.10 name:               time-manager-version:            0.4.0+version:            0.4.1 license:            MIT license-file:       LICENSE maintainer:         kazu@iij.ad.jp