linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug: epoll_wait timeout is shorter than requested
@ 2005-01-17 11:15 Marcin 'Qrczak' Kowalczyk
  2005-01-17 11:48 ` Jamie Lokier
  0 siblings, 1 reply; 8+ messages in thread
From: Marcin 'Qrczak' Kowalczyk @ 2005-01-17 11:15 UTC (permalink / raw)
  To: linux-fsdevel

A program to exhibit the bug:

----------------
#include <sys/epoll.h>
#include <sys/time.h>
#include <stdio.h>

int main(void) {
   int epoll_fd;
   struct timeval time1, time2;
   struct epoll_event event;
   epoll_fd = epoll_create(16);
   gettimeofday(&time1, NULL);
   epoll_wait(epoll_fd, &event, 1, 1000);
   //poll(NULL, 0, 1000);
   gettimeofday(&time2, NULL);
   printf("start: %d.%06d\n", time1.tv_sec, time1.tv_usec);
   printf("stop:  %d.%06d\n", time2.tv_sec, time2.tv_usec);
   return 0;
}
----------------

It should wait one second (at least). Example output on Linux-2.6.10:
start: 1105958820.439410
stop:  1105958821.438636

With poll used instead of epoll the timeout is OK:
start: 1105958827.975209
stop:  1105958828.975944

Is this list a good place to report this?

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak@knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-01-18 23:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-17 11:15 Bug: epoll_wait timeout is shorter than requested Marcin 'Qrczak' Kowalczyk
2005-01-17 11:48 ` Jamie Lokier
2005-01-17 13:41   ` Marcin 'Qrczak' Kowalczyk
2005-01-17 14:33     ` Jamie Lokier
2005-01-17 14:43       ` Jamie Lokier
2005-01-17 16:18       ` Marcin 'Qrczak' Kowalczyk
2005-01-17 16:48         ` Jamie Lokier
2005-01-18 23:27           ` Marcin 'Qrczak' Kowalczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).