Merge pull request #73 from the-louie/lou-fix_problem_with_ratems_on_rpi
Cast rateMs when calculating NewTicker duration to avoid overflow on RPI
This commit is contained in:
commit
accb12e515
|
@ -17,7 +17,7 @@ type Sampler struct {
|
|||
|
||||
func NewSampler(consumer *Consumer, items []*Item, triggers []*Trigger, options config.Options, fileVariables map[string]string, rateMs int) *Sampler {
|
||||
|
||||
ticker := time.NewTicker(time.Duration(rateMs * int(time.Millisecond)))
|
||||
ticker := time.NewTicker(time.Duration(uint32(rateMs) * uint32(time.Millisecond)))
|
||||
|
||||
sampler := &Sampler{
|
||||
consumer,
|
||||
|
|
Loading…
Reference in New Issue