Made a class to take care of accounting for time