Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DefaultClock ¶
type DefaultClock struct{}
DefaultClock is an implementation of Clock interface.
type DefaultRand ¶
type DefaultRand struct{}
DefaultRand is an implementation of Rand interface.
func (*DefaultRand) Float64 ¶
func (r *DefaultRand) Float64() float64
Float64 returns, as a float64, a pseudo-random number in [0.0,1.0) from the default Source.
func (*DefaultRand) Int63n ¶
func (r *DefaultRand) Int63n(n int64) int64
Int63n returns, as an int64, a non-negative pseudo-random number in [0,n) from the default Source.
func (*DefaultRand) Intn ¶
func (r *DefaultRand) Intn(n int) int
Intn returns, as an int, a non-negative pseudo-random number in [0,n) from the default Source.
type MockClock ¶
type MockClock struct {
NowTime int64
}
MockClock is a struct to record current time.
Click to show internal directories.
Click to hide internal directories.