mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 21:57:16 +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()
|
|
}
|