diff options
| author | Pierre-Marie Pédrot | 2018-05-08 12:59:28 +0200 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2018-05-08 12:59:28 +0200 |
| commit | 449eb18b122ca7c2a84e7858cbb9f9639569c025 (patch) | |
| tree | 995c8365969710725b3f24247ef9388b511edf72 /lib/control.ml | |
| parent | 6c8b00e47334f60f200256d45a5542fa80ce4b12 (diff) | |
| parent | ca65a79c1d2aa0e64e8974ea167029e6c48c4924 (diff) | |
Merge PR #7446: [lib] Re-add `set_timeout` to help users workaround #7408
Diffstat (limited to 'lib/control.ml')
| -rw-r--r-- | lib/control.ml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/control.ml b/lib/control.ml index e67cd8b38d..3fbeb168c4 100644 --- a/lib/control.ml +++ b/lib/control.ml @@ -85,4 +85,7 @@ let timeout_fun = match Sys.os_type with | "Unix" | "Cygwin" -> { timeout = unix_timeout } | _ -> { timeout = windows_timeout } -let timeout n f e = timeout_fun.timeout n f e +let timeout_fun_ref = ref timeout_fun +let set_timeout f = timeout_fun_ref := f + +let timeout n f e = !timeout_fun_ref.timeout n f e |
