GetModifyWindow calculates the maximum modify window between the given Fses and the Config.ModifyWindow parameter.
(ctx context.Context, fss ...Info)
| 97 | // GetModifyWindow calculates the maximum modify window between the given Fses |
| 98 | // and the Config.ModifyWindow parameter. |
| 99 | func GetModifyWindow(ctx context.Context, fss ...Info) time.Duration { |
| 100 | window := time.Duration(GetConfig(ctx).ModifyWindow) |
| 101 | for _, f := range fss { |
| 102 | if f != nil { |
| 103 | precision := f.Precision() |
| 104 | if precision == ModTimeNotSupported { |
| 105 | return ModTimeNotSupported |
| 106 | } |
| 107 | if precision > window { |
| 108 | window = precision |
| 109 | } |
| 110 | } |
| 111 | } |
| 112 | return window |
| 113 | } |
searching dependent graphs…