forked from schmittlauch/Hash2Pub
fix time conversion for threadDelay
This commit is contained in:
parent
f7ed0ee8d8
commit
6313a06a83
|
@ -243,7 +243,7 @@ cacheVerifyThread nsSTM = forever $ do
|
||||||
forkIO $ sendQueryIdMessages targetID latestNs (Just (1 + jEntriesPerSlice latestNs)) (nodesToQuery targetID) >> pure () -- ask for 1 entry more than j because of querying the middle
|
forkIO $ sendQueryIdMessages targetID latestNs (Just (1 + jEntriesPerSlice latestNs)) (nodesToQuery targetID) >> pure () -- ask for 1 entry more than j because of querying the middle
|
||||||
)
|
)
|
||||||
|
|
||||||
threadDelay $ toEnum (fromEnum maxEntryAge `div` 20)
|
threadDelay $ 10^6 * round maxEntryAge `div` 20
|
||||||
|
|
||||||
|
|
||||||
-- | Checks the invariant of at least @jEntries@ per cache slice.
|
-- | Checks the invariant of at least @jEntries@ per cache slice.
|
||||||
|
@ -355,7 +355,7 @@ stabiliseThread nsSTM = forever $ do
|
||||||
)
|
)
|
||||||
|
|
||||||
-- TODO: make delay configurable
|
-- TODO: make delay configurable
|
||||||
threadDelay (60 * 1000)
|
threadDelay (60 * 10^6)
|
||||||
where
|
where
|
||||||
-- | send a stabilise request to the n-th neighbour
|
-- | send a stabilise request to the n-th neighbour
|
||||||
-- (specified by the provided getter function) and on failure retr
|
-- (specified by the provided getter function) and on failure retr
|
||||||
|
@ -450,7 +450,7 @@ requestMapPurge mapVar = forever $ do
|
||||||
putMVar mapVar $ Map.filter (\entry@(RequestMapEntry _ _ ts) ->
|
putMVar mapVar $ Map.filter (\entry@(RequestMapEntry _ _ ts) ->
|
||||||
now - ts < responsePurgeAge
|
now - ts < responsePurgeAge
|
||||||
) rMapState
|
) rMapState
|
||||||
threadDelay $ fromEnum responsePurgeAge * 2000
|
threadDelay $ round responsePurgeAge * 2 * 10^6
|
||||||
|
|
||||||
|
|
||||||
-- | Wait for messages, deserialise them, manage parts and acknowledgement status,
|
-- | Wait for messages, deserialise them, manage parts and acknowledgement status,
|
||||||
|
|
Loading…
Reference in a new issue