Add a shared scope, and put timing calculations in it.
Merge pull request #28 from shans/sharedScope

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