Skip to content

Commit 843e856

Browse files
YellowDog3629tomhenderson
authored andcommitted
Fix struct timeval units in DCE poll
1 parent 6f49e59 commit 843e856

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

model/dce-poll.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int dce_poll (struct pollfd *fds, nfds_t nfds, int timeout)
3636
}
3737
else if (timeout > 0)
3838
{
39-
endtime = Now () + MilliSeconds (timeout);
39+
endtime = Now () + MicroSeconds (timeout);
4040
}
4141

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

209209
if (timeout)
210210
{
211-
pollTo = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
211+
pollTo = timeout->tv_sec * 1000000 + timeout->tv_usec / 1000;
212212
}
213213

214214
int pollRet = dce_poll (pollFd, nfds, pollTo);

0 commit comments

Comments
 (0)