Skip to content

Commit

Permalink
Fix struct timeval units in DCE poll
Browse files Browse the repository at this point in the history
  • Loading branch information
pdeutsch-ll authored and tomhenderson committed Oct 22, 2019
1 parent 6f49e59 commit ebc51b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions model/dce-poll.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int dce_poll (struct pollfd *fds, nfds_t nfds, int timeout)
}
else if (timeout > 0)
{
endtime = Now () + MilliSeconds (timeout);
endtime = Now () + MicroSeconds (timeout);
}

for (uint32_t i = 0; i < nfds; ++i)
Expand Down Expand Up @@ -208,7 +208,7 @@ int dce_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,

if (timeout)
{
pollTo = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
pollTo = timeout->tv_sec * 1000000 + timeout->tv_usec / 1000;
}

int pollRet = dce_poll (pollFd, nfds, pollTo);
Expand Down

0 comments on commit ebc51b8

Please sign in to comment.