mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 04:14:03 +03:00
Add documentation for timeattack
This commit is contained in:
@@ -29,6 +29,9 @@ func (d detector) Valid(then time.Time) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// NewDetector returns a new TimeAttackDetector which validates that
|
||||
// timestamp belongs to intervar [X-duration, X+duration], so a small
|
||||
// timeshift is acceptable.
|
||||
func NewDetector(duration time.Duration) mtglib.TimeAttackDetector {
|
||||
return detector{
|
||||
Duration: duration,
|
||||
|
||||
Reference in New Issue
Block a user