Added a timer class

Added a timer class to use in the program.