Bug #10144 ยป tv_nsec-overflow.patch
| time.c | ||
|---|---|---|
|
d = modf(RFLOAT_VALUE(num), &f);
|
||
|
if (d >= 0) {
|
||
|
t.tv_nsec = (int)(d*1e9+0.5);
|
||
|
if (t.tv_nsec >= 1000000000) {
|
||
|
t.tv_nsec -= 1000000000;
|
||
|
f += 1;
|
||
|
}
|
||
|
}
|
||
|
else if ((t.tv_nsec = (int)(-d*1e9+0.5)) > 0) {
|
||
|
t.tv_nsec = 1000000000 - t.tv_nsec;
|
||