follows the XS implementation

let the timeout unit be milliseconds,
and let pp_fetch take an extra param that is the timeout value.

When the value is 0, it means no timeout (just keep waiting.)