☰
Debian Codegraph
@
0.6.117-1
0.6.109-1
0.6.105-1
/
/
cmd
/
atomdns
/
internal
/
dnsmetrics
/
metrics.go
☽
☼
cmd/atomdns/internal/dnsmetrics/metrics.go
code
plain
raw
BSD-3-Clause
2009 The Go Authors; 2011 Miek Gieben <
[email protected]
>
debian/copyright
1
package dnsmetrics
2
3
// Should returns true when we should gather a metric. This is done every N times. If N isn't 0 (no metrics),
4
// i is incremented.
5
func Should(i *uint64, N uint64) bool {
6
if N == 0 {
7
return false
8
}
9
ok := *i%N == 0
10
*i++
11
return ok
12
}