зеркало из https://github.com/mozilla/pjs.git
fixes bug 226022 "overflow error in PR_Poll means timeout < 1 second returns too quickly" patch=brofield@jellycan.com r=wtc,darin
This commit is contained in:
Родитель
fff129fc2a
Коммит
2470804c7e
|
@ -689,8 +689,7 @@ _MD_pr_poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
|
|||
{
|
||||
PRInt32 ticksPerSecond = PR_TicksPerSecond();
|
||||
tv.tv_sec = remaining / ticksPerSecond;
|
||||
tv.tv_usec = remaining - (ticksPerSecond * tv.tv_sec);
|
||||
tv.tv_usec = (PR_USEC_PER_SEC * tv.tv_usec) / ticksPerSecond;
|
||||
tv.tv_usec = PR_IntervalToMicroseconds( remaining % ticksPerSecond );
|
||||
tvp = &tv;
|
||||
}
|
||||
|
||||
|
|
|
@ -237,8 +237,7 @@ retry:
|
|||
{
|
||||
PRInt32 ticksPerSecond = PR_TicksPerSecond();
|
||||
tv.tv_sec = remaining / ticksPerSecond;
|
||||
tv.tv_usec = remaining - (ticksPerSecond * tv.tv_sec);
|
||||
tv.tv_usec = (PR_USEC_PER_SEC * tv.tv_usec) / ticksPerSecond;
|
||||
tv.tv_usec = PR_IntervalToMicroseconds( remaining % ticksPerSecond );
|
||||
tvp = &tv;
|
||||
}
|
||||
|
||||
|
|
|
@ -402,8 +402,7 @@ retry:
|
|||
{
|
||||
PRInt32 ticksPerSecond = PR_TicksPerSecond();
|
||||
tv.tv_sec = remaining / ticksPerSecond;
|
||||
tv.tv_usec = remaining - (ticksPerSecond * tv.tv_sec);
|
||||
tv.tv_usec = (PR_USEC_PER_SEC * tv.tv_usec) / ticksPerSecond;
|
||||
tv.tv_usec = PR_IntervalToMicroseconds( remaining % ticksPerSecond );
|
||||
tvp = &tv;
|
||||
}
|
||||
|
||||
|
|
|
@ -262,8 +262,7 @@ PRInt32 _PR_MD_PR_POLL(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
|
|||
{
|
||||
PRInt32 ticksPerSecond = PR_TicksPerSecond();
|
||||
tv.tv_sec = timeout / ticksPerSecond;
|
||||
tv.tv_usec = timeout - (ticksPerSecond * tv.tv_sec);
|
||||
tv.tv_usec = (PR_USEC_PER_SEC * tv.tv_usec) / ticksPerSecond;
|
||||
tv.tv_usec = PR_IntervalToMicroseconds( timeout % ticksPerSecond );
|
||||
tvp = &tv;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче