Commit a9542483 authored by lahiker42@gmail.com's avatar lahiker42@gmail.com

move time-sync to front of dispatch


git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@330 00440858-1255-0410-a3e6-75ea37f81c3a
parent d6857c2e
......@@ -579,6 +579,10 @@ protobuf_c_dispatch_dispatch (ProtobufCDispatch *dispatch,
protobuf_c_assert (!d->is_dispatching);
d->is_dispatching = 1;
gettimeofday (&tv, NULL);
dispatch->last_dispatch_secs = tv.tv_sec;
dispatch->last_dispatch_usecs = tv.tv_usec;
fd_max = 0;
for (i = 0; i < n_notifies; i++)
if (fd_max < (unsigned) notifies[i].fd)
......@@ -621,9 +625,6 @@ protobuf_c_dispatch_dispatch (ProtobufCDispatch *dispatch,
dispatch->has_idle = 0;
/* handle timers */
gettimeofday (&tv, NULL);
dispatch->last_dispatch_secs = tv.tv_sec;
dispatch->last_dispatch_usecs = tv.tv_usec;
while (d->timer_tree != NULL)
{
ProtobufCDispatchTimer *min_timer;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment