Run benchmarks for a fixed number of milliseconds

Use the same approach as the Dart benchmark_harness and run the
benchmarks for a fixed number of milliseconds instead of a fixed
number of times.