From d95132f7424abe4ce0697462de185aff43cc7724 Mon Sep 17 00:00:00 2001 From: Zygmunt Krynicki Date: Wed, 30 Sep 2020 10:55:22 +0200 Subject: [PATCH] desktop/notification: stay compatble with go < 1.13 time.Duration.Milliseconds was added in go 1.13, and has a trivial implementation. Replicate that implementation instead of depending on it. Ref: https://go-review.googlesource.com/c/go/+/167387/2/src/time/time.go Signed-off-by: Zygmunt Krynicki --- desktop/notification/fdo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/notification/fdo.go b/desktop/notification/fdo.go index 99f2e8b9803..0ba8ccd6fa9 100644 --- a/desktop/notification/fdo.go +++ b/desktop/notification/fdo.go @@ -80,7 +80,7 @@ func (srv *Server) SendNotification(msg *Message) (ID, error) { call := srv.obj.Call(dBusInterfaceName+".Notify", 0, msg.AppName, msg.ReplacesID, msg.Icon, msg.Summary, msg.Body, flattenActions(msg.Actions), mapHints(msg.Hints), - int32(msg.ExpireTimeout.Milliseconds())) + int32(msg.ExpireTimeout.Nanoseconds()/1e6)) var id ID if err := call.Store(&id); err != nil { return 0, err