Skip to content

Commit

Permalink
Update engine.js
Browse files Browse the repository at this point in the history
Reverts commit DeviaVir#2425 and fixes the broken sim results
  • Loading branch information
xwolfyxNL authored Jan 5, 2021
1 parent c49b5ea commit a2010e9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -758,14 +758,7 @@ module.exports = function (s, conf) {
}

function withOnPeriod (trade, period_id, cb) {
if (!clock && so.mode !== 'live' && so.mode !== 'paper') clock = lolex.install(
{
shouldAdvanceTime: false,
now: trade.time,
toFake: [
'setTimeout'
]
})
if (!clock && so.mode !== 'live' && so.mode !== 'paper') clock = lolex.install({ shouldAdvanceTime: false, now: trade.time })

updatePeriod(trade)
if (!s.in_preroll) {
Expand All @@ -783,7 +776,7 @@ module.exports = function (s, conf) {
clock.tick(5000)
diff -= 5000
}
clock.tick(diff < 0 ? 1 : diff)
clock.tick(diff)
}

if (s.signal) {
Expand Down

0 comments on commit a2010e9

Please sign in to comment.