adding timeout in kevent()