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

View file

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