Make clear that it is milliseconds

This commit is contained in:
Daniel 2024-11-06 20:55:48 -05:00
parent 3b8a50d3e8
commit c423749f26
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ func (d CallDuration) Duration() time.Duration {
return time.Duration(d) return time.Duration(d)
} }
func (d CallDuration) Int32Ptr() *int32 { func (d CallDuration) MsInt32Ptr() *int32 {
if time.Duration(d) == 0 { if time.Duration(d) == 0 {
return nil return nil
} }
@ -106,7 +106,7 @@ func (c *Call) ToPB() *pb.Call {
Frequencies: toInt64Slice(c.Frequencies), Frequencies: toInt64Slice(c.Frequencies),
Patches: toInt32Slice(c.Patches), Patches: toInt32Slice(c.Patches),
Sources: toInt32Slice(c.Sources), Sources: toInt32Slice(c.Sources),
Duration: c.Duration.Int32Ptr(), Duration: c.Duration.MsInt32Ptr(),
Audio: c.Audio, Audio: c.Audio,
} }
} }

View file

@ -50,7 +50,7 @@ func (s *DatabaseSink) toAddCallParams(call *calls.Call) database.AddCallParams
AudioName: common.PtrOrNull(call.AudioName), AudioName: common.PtrOrNull(call.AudioName),
AudioBlob: call.Audio, AudioBlob: call.Audio,
AudioType: common.PtrOrNull(call.AudioType), AudioType: common.PtrOrNull(call.AudioType),
Duration: call.Duration.Int32Ptr(), Duration: call.Duration.MsInt32Ptr(),
Frequency: call.Frequency, Frequency: call.Frequency,
Frequencies: call.Frequencies, Frequencies: call.Frequencies,
Patches: call.Patches, Patches: call.Patches,