mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
fix: fixed replay time computation using actual dates instead of the assumption of one frame per second
This commit is contained in:
parent
50d01429cd
commit
54116f7fbe
4 changed files with 45 additions and 2 deletions
|
@ -50,10 +50,18 @@ func (mod *RestAPI) startReplay(filename string) (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
mod.recStarted = mod.record.Session.StartedAt()
|
||||
mod.recStopped = mod.record.Session.StoppedAt()
|
||||
duration := mod.recStopped.Sub(mod.recStarted)
|
||||
mod.recTime = int(duration.Seconds())
|
||||
mod.replaying = true
|
||||
mod.recording = false
|
||||
|
||||
mod.Info("loaded %d frames in %s, started replaying ...", mod.record.Session.Frames(), loadedIn)
|
||||
mod.Info("loaded %s of recording (%d frames) started at %s in %s, started replaying ...",
|
||||
duration,
|
||||
mod.record.Session.Frames(),
|
||||
mod.recStarted,
|
||||
loadedIn)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue