]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - sched.h
sched: Use integer value for select timeout.
[paraslash.git] / sched.h
diff --git a/sched.h b/sched.h
index 35e2503e383be3611fc302f5a732e45cf322d506..4695da05040d1934e0c23a12db9bb14c7e9f799c 100644 (file)
--- a/sched.h
+++ b/sched.h
  * called after the select call.
  */
 struct sched {
-       /** Initial value before any pre_select call. */
-       struct timeval default_timeout;
-       /** The current timeout for the upcoming select call. */
-       struct timeval select_timeout;
+       /** Initial value (in milliseconds) before any pre_select call. */
+       int default_timeout;
+       /** The timeout (also in milliseconds) for the next select call. */
+       int timeout;
        /** fds that should be watched for readability. */
        fd_set rfds;
        /** fds that should be watched for writability. */
@@ -24,7 +24,7 @@ struct sched {
        /** Highest numbered file descriptor in any of the above fd sets. */
        int max_fileno;
        /** If non-NULL, use this function instead of para_select. */
-       int (*select_function)(int, fd_set *, fd_set *, struct timeval *);
+       int (*select_function)(int, fd_set *, fd_set *, int timeout);
        /** Tasks which have been registered to the scheduler. */
        struct list_head task_list;
 };