Timer class added

Needs proper testing to make sure it works properly.