kopia lustrzana https://github.com/micropython/micropython-lib
select: Convert float timeout to int with math.ceil.
In CPython, timeout is a float and the value rounded up to the nearest millisecond.pull/222/merge
rodzic
03c1e65e6e
commit
b54987bd14
|
@ -4,6 +4,7 @@ import os
|
|||
import errno
|
||||
import ffilib
|
||||
import utime
|
||||
import math
|
||||
from uselect import *
|
||||
|
||||
|
||||
|
@ -92,7 +93,7 @@ class Epoll:
|
|||
return res
|
||||
|
||||
def poll(self, timeout=-1):
|
||||
return self.poll_ms(-1 if timeout == -1 else timeout * 1000)
|
||||
return self.poll_ms(-1 if timeout == -1 else math.ceil(timeout * 1000))
|
||||
|
||||
def close(self):
|
||||
os.close(self.epfd)
|
||||
|
|
Ładowanie…
Reference in New Issue