sdl2: common timer code. Fixes Furyhunter/SRB2#6