Add Timer class.

Also fixed some unittest errors.