fix: fixed replay time computation using actual dates instead of the assumption of one frame per second

This commit is contained in:
evilsocket 2019-03-30 13:59:08 +01:00
parent 50d01429cd
commit 54116f7fbe
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
4 changed files with 45 additions and 2 deletions

View file

@ -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",