modify libxlTimeoutRegisterEventHook as same as libxlFDRegisterEventHook