Fix Timer class and unit test

This PR addresses issue #14.