mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -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
|
@ -35,6 +35,8 @@ type RestAPI struct {
|
|||
recordFileName string
|
||||
recordWait *sync.WaitGroup
|
||||
record *Record
|
||||
recStarted time.Time
|
||||
recStopped time.Time
|
||||
}
|
||||
|
||||
func NewRestAPI(s *session.Session) *RestAPI {
|
||||
|
@ -65,6 +67,8 @@ func NewRestAPI(s *session.Session) *RestAPI {
|
|||
mod.State.Store("rec_filename", &mod.recordFileName)
|
||||
mod.State.Store("rec_frames", 0)
|
||||
mod.State.Store("rec_cur_frame", 0)
|
||||
mod.State.Store("rec_started", &mod.recStarted)
|
||||
mod.State.Store("rec_stopped", &mod.recStopped)
|
||||
|
||||
mod.AddParam(session.NewStringParameter("api.rest.address",
|
||||
"127.0.0.1",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue