Skip to content

Commit 44366dd

Browse files
committed
io-sim-por: fixed a typo
1 parent 3a3cf56 commit 44366dd

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

io-sim/src/Control/Monad/IOSim/Internal.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ invariant Nothing SimState{runqueue,threads,clocks} =
165165

166166
-- | Interpret the simulation monotonic time as a 'NominalDiffTime' since
167167
-- the start.
168-
timeSiceEpoch :: Time -> NominalDiffTime
169-
timeSiceEpoch (Time t) = fromRational (toRational t)
168+
timeSinceEpoch :: Time -> NominalDiffTime
169+
timeSinceEpoch (Time t) = fromRational (toRational t)
170170

171171

172172
-- | Schedule / run a thread.
@@ -276,14 +276,14 @@ schedule thread@Thread{
276276
GetWallTime k -> do
277277
let clockid = threadClockId thread
278278
clockoff = clocks Map.! clockid
279-
walltime = timeSiceEpoch time `addUTCTime` clockoff
279+
walltime = timeSinceEpoch time `addUTCTime` clockoff
280280
thread' = thread { threadControl = ThreadControl (k walltime) ctl }
281281
schedule thread' simstate
282282

283283
SetWallTime walltime' k -> do
284284
let clockid = threadClockId thread
285285
clockoff = clocks Map.! clockid
286-
walltime = timeSiceEpoch time `addUTCTime` clockoff
286+
walltime = timeSinceEpoch time `addUTCTime` clockoff
287287
clockoff' = addUTCTime (diffUTCTime walltime' walltime) clockoff
288288
thread' = thread { threadControl = ThreadControl k ctl }
289289
simstate' = simstate { clocks = Map.insert clockid clockoff' clocks }

io-sim/src/Control/Monad/IOSimPOR/Internal.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ invariant Nothing SimState{runqueue,threads,clocks} =
207207

208208
-- | Interpret the simulation monotonic time as a 'NominalDiffTime' since
209209
-- the start.
210-
timeSiceEpoch :: Time -> NominalDiffTime
211-
timeSiceEpoch (Time t) = fromRational (toRational t)
210+
timeSinceEpoch :: Time -> NominalDiffTime
211+
timeSinceEpoch (Time t) = fromRational (toRational t)
212212

213213

214214
-- | Schedule / run a thread.
@@ -355,14 +355,14 @@ schedule thread@Thread{
355355
GetWallTime k -> do
356356
let clockid = threadClockId thread
357357
clockoff = clocks Map.! clockid
358-
walltime = timeSiceEpoch time `addUTCTime` clockoff
358+
walltime = timeSinceEpoch time `addUTCTime` clockoff
359359
thread' = thread { threadControl = ThreadControl (k walltime) ctl }
360360
schedule thread' simstate
361361

362362
SetWallTime walltime' k -> do
363363
let clockid = threadClockId thread
364364
clockoff = clocks Map.! clockid
365-
walltime = timeSiceEpoch time `addUTCTime` clockoff
365+
walltime = timeSinceEpoch time `addUTCTime` clockoff
366366
clockoff' = addUTCTime (diffUTCTime walltime' walltime) clockoff
367367
thread' = thread { threadControl = ThreadControl k ctl }
368368
simstate' = simstate { clocks = Map.insert clockid clockoff' clocks }

0 commit comments

Comments
 (0)