Added TGTimer class, a general timer, which will first be used to keep track of keypress timers.