What
Handle timeout settings in a dedicated piece of code.
Why
We currently set timeouts like this:
// timeouts must be multiplied by milliseconds
..timeout = time.Duration(obj.Get(k).ToInteger()) * time.Millisecond
We repeat from multiple places in the code. It's error-prone, and we must remember to do this every time.
How
Add a dedicated package or function to handle timeout calculations.