m->prepared_timeout = calc_next_timeout(m);
if (timeout >= 0) {
- uint64_t u = (uint64_t) timeout * PA_USEC_PER_MSEC;
-
- if (u < m->prepared_timeout || m->prepared_timeout == PA_USEC_INVALID)
- m->prepared_timeout = u;
+ if (timeout < m->prepared_timeout || m->prepared_timeout == PA_USEC_INVALID)
+ m->prepared_timeout = timeout;
}
}
/** Prepare for a single iteration of the main loop. Returns a negative value
on error or exit request. timeout specifies a maximum timeout for the subsequent
-poll, or -1 for blocking behaviour. .*/
+poll, or -1 for blocking behaviour. The timeout is specified in microseconds. */
int pa_mainloop_prepare(pa_mainloop *m, int timeout);
/** Execute the previously prepared poll. Returns a negative value on error.*/