From c423749f2622c6fabd83ed16adfd7f3bb7afb848 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Wed, 6 Nov 2024 20:55:48 -0500 Subject: [PATCH] Make clear that it is milliseconds --- pkg/calls/call.go | 4 ++-- pkg/sinks/database.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/calls/call.go b/pkg/calls/call.go index d7d8c0e..07b633d 100644 --- a/pkg/calls/call.go +++ b/pkg/calls/call.go @@ -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, } } diff --git a/pkg/sinks/database.go b/pkg/sinks/database.go index 61ff7c0..22bf75c 100644 --- a/pkg/sinks/database.go +++ b/pkg/sinks/database.go @@ -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,