normalize_watch_opts Subroutine

public subroutine normalize_watch_opts(w)

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.

Arguments

Type IntentOptional Attributes Name
type(watch_opts_t), intent(inout) :: w

Called by

proc~~normalize_watch_opts~~CalledByGraph proc~normalize_watch_opts normalize_watch_opts proc~apply_watch_flag apply_watch_flag proc~apply_watch_flag->proc~normalize_watch_opts proc~apply_watch_from_manifest apply_watch_from_manifest proc~apply_watch_from_manifest->proc~normalize_watch_opts proc~parse_cli parse_cli proc~parse_cli->proc~normalize_watch_opts proc~parse_cli->proc~apply_watch_flag proc~parse_cli->proc~apply_watch_from_manifest proc~parse_cli_config parse_cli_config proc~parse_cli_config->proc~parse_cli

Source Code

   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