@@ -8,11 +8,12 @@ import (
88type RoundHandlerStub struct {
99 RoundIndex int64
1010
11- IndexCalled func () int64
12- TimeDurationCalled func () time.Duration
13- TimeStampCalled func () time.Time
14- UpdateRoundCalled func (time.Time , time.Time )
15- RemainingTimeCalled func (startTime time.Time , maxTime time.Duration ) time.Duration
11+ IndexCalled func () int64
12+ TimeDurationCalled func () time.Duration
13+ TimeStampCalled func () time.Time
14+ UpdateRoundCalled func (time.Time , time.Time )
15+ RemainingTimeCalled func (startTime time.Time , maxTime time.Duration ) time.Duration
16+ GetTimeStampForRoundCalled func (round uint64 ) uint64
1617}
1718
1819// Index -
@@ -61,6 +62,15 @@ func (rndm *RoundHandlerStub) RemainingTime(startTime time.Time, maxTime time.Du
6162 return 4000 * time .Millisecond
6263}
6364
65+ // GetTimeStampForRound -
66+ func (rndm * RoundHandlerStub ) GetTimeStampForRound (round uint64 ) uint64 {
67+ if rndm .GetTimeStampForRoundCalled != nil {
68+ return rndm .GetTimeStampForRoundCalled (round )
69+ }
70+
71+ return uint64 (time .Unix (0 , 0 ).UnixMilli ())
72+ }
73+
6474// IsInterfaceNil returns true if there is no value under the interface
6575func (rndm * RoundHandlerStub ) IsInterfaceNil () bool {
6676 return rndm == nil
0 commit comments