From 2114ec7be595dc2ec9304342857962aef31c6036 Mon Sep 17 00:00:00 2001 From: shoopea Date: Sat, 24 Aug 2019 14:07:35 +0800 Subject: [PATCH] fix delay --- td.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td.go b/td.go index 2c61769..5be6826 100644 --- a/td.go +++ b/td.go @@ -219,9 +219,9 @@ func OwnUserID(c *tdlib.Client) int32 { } func clientMsg(c *tdlib.Client, m TGCommand) { - log.Printf("clientMsg : Delaying message by %d seconds.\n", int64(m.Delay)) if m.Delay != time.Duration(0) { - time.Sleep(time.Duration(m.Delay) * time.Second) + log.Printf("clientMsg : Delaying message by %d seconds.\n", int64(m.Delay)) + time.Sleep(m.Delay) } for { lastOwnTDMsgMux.Lock()