measureTime

Measure the amount of time a process takes.

TODO: use contracts when they are no longer experimental