generates a time class