Perhaps what your looking for is the
Benchmark module.
Specifically the new method and the timediff, timesum & timestr functions.
Then again, maybe not, since it doesn't seem to have facilities to create/input/output arbitrary time intervals and formats.