mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
19 lines
337 B
Go
19 lines
337 B
Go
package utils
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Clock represents a time providing interface that can be mocked for testing.
|
|
type Clock interface {
|
|
Now() time.Time
|
|
}
|
|
|
|
// RealClock represents an unmodified clock.
|
|
type RealClock struct{}
|
|
|
|
// Now represents the standard functionality of time.
|
|
func (RealClock) Now() time.Time {
|
|
return time.Now()
|
|
}
|