func Rand(max int) int {
	i, _ := rand.Int(rand.Reader, big.NewInt(int64(max)))
	return int(i.Int64())
}
Rand returns a positive random int up to max
package gobot
import (
	"crypto/rand"
	"errors"
	"log"
	"math"
	"math/big"
	"time"
)
var (
	ErrUnknownEvent = errors.New("Event does not exist")
)
var eventError = func(e *Event) (err error) {
	if e == nil {
		err = ErrUnknownEvent
		log.Println(err.Error())
		return
	}
	return
}
func Every(t time.Duration, f func()) chan bool {
	done := make(chan bool)
	c := time.Tick(t)
	go func() {
		for {
			select {
			case <-done:
				return
			default:
				<-c
				go f()
			}
		}
	}()
	return done
}
func After(t time.Duration, f func()) {
	time.AfterFunc(t, f)
}