/* pa_time_event_cb_t timer event handler */ static void handle_time_event(pa_mainloop_api *ea, pa_time_event* e, const struct timeval *t, void *userdata) { struct timeval tv; struct timeout_data *d = userdata; pa_assert(d); pa_assert(d->connection); if (dbus_timeout_get_enabled(d->timeout)) { /* Restart it for the next scheduled time. We do this before * calling dbus_timeout_handle() to make sure that the time * event is still around. */ ea->time_restart(e, pa_timeval_rtstore(&tv, pa_timeval_load(t) + dbus_timeout_get_interval(d->timeout) * PA_USEC_PER_MSEC, d->connection->use_rtclock)); dbus_timeout_handle(d->timeout); } }
pa_usec_t pa_rtclock_usec(void) { struct timeval tv; return pa_timeval_load(pa_rtclock_get(&tv)); }