QueryPerformanceFrequency() private method

private QueryPerformanceFrequency ( long &lpFrequency ) : bool
lpFrequency long
return bool
コード例 #1
0
        public PrecisionTimer()
        {
            //how many ticks per sec do we get
            QueryPerformanceWrapper.QueryPerformanceFrequency(out _perfCountFreq);

            _timeScale = 1.0 / _perfCountFreq;
        }
コード例 #2
0
        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);
        }