add -n check
This commit is contained in:
parent
fdd7a7bb98
commit
cbd92a8d42
2
main.go
2
main.go
|
@ -100,6 +100,8 @@ func main() {
|
||||||
|
|
||||||
if *percent < 0 || *percent > 1 {
|
if *percent < 0 || *percent > 1 {
|
||||||
log.Fatal("invalid percentage")
|
log.Fatal("invalid percentage")
|
||||||
|
} else if *nevents < 0 {
|
||||||
|
log.Fatal("number of events must be non-negative")
|
||||||
}
|
}
|
||||||
|
|
||||||
t := time.Now().Unix() - formula(*percent)
|
t := time.Now().Unix() - formula(*percent)
|
||||||
|
|
Loading…
Reference in New Issue