public PrecisionTimer() { //how many ticks per sec do we get QueryPerformanceWrapper.QueryPerformanceFrequency(out _perfCountFreq); _timeScale = 1.0 / _perfCountFreq; }
public PrecisionTimer(double fps) { _normalFPS = fps; //how many ticks per sec do we get QueryPerformanceWrapper.QueryPerformanceFrequency(out _perfCountFreq); _timeScale = 1.0 / _perfCountFreq; //calculate ticks per frame _frameTime = (long)(_perfCountFreq / _normalFPS); }