mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-03-03 07:29:23 +00:00
Fix redbean unix.poll() with -1 timeout
This commit is contained in:
parent
f10845ab9f
commit
fb2bd313ae
1 changed files with 6 additions and 2 deletions
|
@ -23,7 +23,11 @@
|
|||
*/
|
||||
struct timespec timespec_frommillis(int64_t x) {
|
||||
struct timespec ts;
|
||||
if (x >= 0) {
|
||||
ts.tv_sec = x / 1000;
|
||||
ts.tv_nsec = x % 1000 * 1000000;
|
||||
} else {
|
||||
ts = timespec_max;
|
||||
}
|
||||
return ts;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue