Closed Jordan-Cottle closed 2 years ago
This is incredible!!! thanks so much. I thought after doing setInterval it was going to take me ages and hadn't realised you could just do that with a threading.Timer. This is pretty major as those 2 methods are ones people know. I'm noticing 90% of the methods I'm porting I didn't even realise existed. But everyone knows those 2 so they've been on my radar for months now. I wlil try to sort these into a release today. I'm hugely grateful.
thanks again. this is now in 0.4.7 . great work. two .js classics now available in python
This should be a working implementation for
setTimeout
andclearTimeout
as mentioned in #11.I'm not familiar enough with the project to know how to integrate it with
SetInterval
mentioned in the issue, butthreading.Timer
is a python builtin that provides pretty much exactly the same functionality assetTimeout
andclearTimeout
does in javascript.I've also added two tests for this. One that checks that the callback is actually called, and the other that checks that a callback can be canceled properly.