X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2FIOHandler.c;fp=src%2FIOHandler.c;h=db9a5998d2f5dc486ad39fa69eb0d050d50cfca0;hp=81d8d0982fd70c9d8db824427baed4acf7fba361;hb=0bfb874e21c8552b50d2736803567fd28cb29a58;hpb=233e55c4318a701ac90fc3f8fa339cd5ccfb35b5 diff --git a/src/IOHandler.c b/src/IOHandler.c index 81d8d09..db9a599 100644 --- a/src/IOHandler.c +++ b/src/IOHandler.c @@ -706,11 +706,15 @@ void iohandler_events(struct IODescriptor *iofd, int readable, int writeable) { } void iohandler_poll() { + struct timeval timeout; + timeout.tv_sec = IO_MAX_TIMEOUT; + timeout.tv_usec = 0; + iohandler_poll_timeout(timeout); +} + +void iohandler_poll_timeout(struct timeval timeout) { if(engine) { IOSYNCHRONIZE(io_poll_sync); //quite senceless multithread support... better support will follow - struct timeval timeout; - timeout.tv_sec = IO_MAX_TIMEOUT; - timeout.tv_usec = 0; engine->loop(&timeout); IODESYNCHRONIZE(io_poll_sync); }