Add timer class
Fix fps bug