News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Timestamp Counters

Started by asmfan, April 17, 2006, 05:24:05 PM

Previous topic - Next topic

asmfan

Am i right? Both GetTickCount and QueryPerformanceCounter are based on RDTSC? The first one returns only low 32 bit in eax arter using RDTSC and the second one returns the full 64 bit in pair edx:eax. Is it correct?
Thanks,
Igor.
Russia is a weird place

MichaelW

AFAIK the tick count and the performance counters are based on the system timer (PIT). On a Windows 9x system QueryPerformanceFrequency typically returns something close to 1193182, which is the normal input frequency for the PIT. There is some related information here, see posts by dioxin:

http://www.masmforum.com/simple/index.php?topic=3970.0

eschew obfuscation

P1

GetTickCount = milliseconds from boot, this is done differently from os to os, AFAIK.  PIT here seems right to me.
QueryPerformanceCounter = cpu clock cycles from boot, where as this a read from the cpu register.  No PIT here.  This is why you can calculate system frequency from this register.

Regards,  P1  :8)

asmfan

Thanks guys, also wonder could you give me some kind of link to successful use of performance monitor counters (aka PMC) and/or model specific registers (MSR). Assembly commands - RDPMC, RDMSR/WRMSR. Are these command can be well used? And where/what for? Have you ever used them?
Thans.
Russia is a weird place

P1

Goto the Intel website, they uP specific opcode documentation for you.

Regards,  P1  :8)