util::http::curl::timeout (private)
util::http::curl::timeout input
Defined in packages/acs-tcl/tcl/http-client-procs.tcl
Convert the provided timeout value to a format suitable for curl. Since curl versions before 7.32.0 just accept integer, the granularity is set to seconds. On doubt, the value is rounded up.
- Parameters:
- input (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: if {[string is integer -strict $input]} { return $input } elseif {[string is double -strict $input]} { set secs [expr {int($input)}] set secfrac [expr {$input - $secs}] if {$secfrac < 0.001} { return [expr {$secs + 1}] } return $secs } elseif {[regexp {^([0-9]+):([0-9]*)$} $input _ secs microsecs]} { if {$microsecs > 1000} { return [expr {$secs + 1}] } return $secs } return $inputXQL Not present: Generic, PostgreSQL, Oracle