Add a shared scope, and put timing calculations in it.