Just rewrite time.py and tweaked time_tests.py