I wanted to propose the addition of a Timer class to the multiprocessing library similar to the one that exists in the Threading module. Timer provides an example of how to extend the Process class that might be helpful to beginners. The current lack of a Timer in the multiprocessing library could encourage newer programmers to use threads where processes would be more appropriate. In the implementation below I have added the ability to specify a # of iterations that the timed function should execute, and an additional infinite argument that would make the process execute the given function until the Timer is explicitly stopped.
The threading.Timer class is in my experience little used, for two reasons: 1) it's not very flexible (no periodic calls, no restart...) 2) it's not efficient (as it creates a new thread for each timer) 3) (third optional reason) many applications needing time management actually use an event loop of some kind, as the need for time management is often coupled with the requirement to do network I/O A hypothetical multiprocessing.Timer would have the same drawbacks as threading.Timer, the inefficiency being of course much worse.
I think your three reasons make sense, I've only found threading.Timer helpful in pretty trivial cases. Do you think a more flexible or efficient Timer class would be useful?