Added the ability to start and stop measurements.

Change the variable MEASURE_FREQUENCY to increase the rate of snapshots.