Check out the example in the 3rd comment :
http://code.activestate.com/recipes/413137-call-a-functionmethod-x-times-per-second/
That is cool.
Copyright (c) 2024 Michel Hollands