File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,9 +163,9 @@ def test_control_and_wait(self):
163163 ep .register (client .fileno (),
164164 select .EPOLLIN | select .EPOLLOUT | select .EPOLLET )
165165
166- now = time .time ()
166+ now = time .monotonic ()
167167 events = ep .poll (1 , 4 )
168- then = time .time ()
168+ then = time .monotonic ()
169169 self .assertFalse (then - now > 0.1 , then - now )
170170
171171 events .sort ()
@@ -181,9 +181,9 @@ def test_control_and_wait(self):
181181 client .send (b"Hello!" )
182182 server .send (b"world!!!" )
183183
184- now = time .time ()
184+ now = time .monotonic ()
185185 events = ep .poll (1 , 4 )
186- then = time .time ()
186+ then = time .monotonic ()
187187 self .assertFalse (then - now > 0.01 )
188188
189189 events .sort ()
@@ -195,9 +195,9 @@ def test_control_and_wait(self):
195195
196196 ep .unregister (client .fileno ())
197197 ep .modify (server .fileno (), select .EPOLLOUT )
198- now = time .time ()
198+ now = time .monotonic ()
199199 events = ep .poll (1 , 4 )
200- then = time .time ()
200+ then = time .monotonic ()
201201 self .assertFalse (then - now > 0.01 )
202202
203203 expected = [(server .fileno (), select .EPOLLOUT )]
@@ -214,9 +214,9 @@ def test_unregister_closed(self):
214214 ep = select .epoll (16 )
215215 ep .register (server )
216216
217- now = time .time ()
217+ now = time .monotonic ()
218218 events = ep .poll (1 , 4 )
219- then = time .time ()
219+ then = time .monotonic ()
220220 self .assertFalse (then - now > 0.01 )
221221
222222 server .close ()
You can’t perform that action at this time.
0 commit comments