Normalize watcher options and clamp to safe bounds.
Clamping prevents pathological values (e.g., negative times, too-small poll intervals) from degrading performance or usability.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(watch_opts_t), | intent(inout) | :: | w |
subroutine normalize_watch_opts(w) type(watch_opts_t), intent(inout) :: w if (w%poll < 0.05) w%poll = 0.05 if (w%debounce < 0.0) w%debounce = 0.0 if (w%rescan < 0.0) w%rescan = 0.0 if (w%verbosity > 2) w%verbosity = 2 if (w%verbosity < -1) w%verbosity = -1 end subroutine normalize_watch_opts