jira-bot/pkg/utils/pool.go

14 lines
220 B
Go
Raw Permalink Normal View History

2021-06-03 01:59:32 +03:00
package utils
import (
"time"
telegram "gopkg.in/tucnak/telebot.v2"
)
func NewPooler(t int) *telegram.LongPoller {
tm := time.Second * time.Duration(t)
poller := &telegram.LongPoller{Timeout: tm}
return poller
}