[change timer] optimise code, fix BSOD.