We simply note the fact that the rdtsc return value went backwards between two consecutive calls. RDTSC returns a monitonically increasing value per CPU so it going backwards means that we jumped to a different CPU and the counters aren't being kept in sync (certain dual core AMD architectures suffer from this feature). When we detect that jump backwards we just let time slip a little (as there is no reliable way to know exactly how much time was lost), we only use this timer for non-critical timing functions (i.e not in running the game simulation).
- Alfred Gary Stanley wrote: > How are you calculating the drift for each cpu? (code snipplets would > be nice) > > I've always wanted to know how to 'detect' TSC drifting. :) > > > At 01:47 PM 1/4/2007, Alfred Reynolds wrote: >> You can ignore that assert, it means that you have a dual core CPU >> and the RDTSC counters on each core do not stay in sync (a "feature" >> of certain AMD cpus). We have code to handle this issue, the assert >> is just in place so we could determine what hardware setups have the >> problem :) The next server release should remove that assert (as we >> have answered the question now). >> >> - Alfred >> >> Saint K. wrote: >>> Hi,, >>> Im getting the following error on my clean CS 1.6 install: >>> >>> reliabletimer.h (73) : Assertion Failed: m_nPerformanceCounterEnd >>> >= m_nPerformanceCounterStart >>> >>> >>> i've searched google for this error, but apperantly it only occures >>> at windows machines. >>> >>> My config: >>> Tyan mobo >>> AMD X2 4200+ >>> 2GB 400MHz mem >>> 250GB 7200RPM disk >>> Distro: Debian >>> >>> Any idea's on what triggers this error? >>> >>> cheers, >>> >>> Saint K. >>> >>> >>> _______________________________________________ >>> To unsubscribe, edit your list preferences, or view the list >>> archives, please visit: >>> http://list.valvesoftware.com/mailman/listinfo/hlds_linux >> >> _______________________________________________ >> To unsubscribe, edit your list preferences, or view the list >> archives, please visit: >> http://list.valvesoftware.com/mailman/listinfo/hlds_linux > > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list > archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlds_linux _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux

