Implemented time measurements and benchmarks.

Fixes #1
Fixes #2