Create timed_script.py

Adds timed function running support.