ReadClock question - Possible overflow?
- From: yancheng.cheok@xxxxxxxxx
- Date: 31 May 2006 03:04:21 -0700
; RDTSC.ASM Agner Fog
2003
; © 2003 GNU General Public License www.gnu.org/copyleft/gpl.html
PublicAlias _ReadClock ; Underscore needed when called from
Windows
push ebx
sub eax, eax
cpuid ; serialize
rdtsc ; read time stamp counter
push eax
push edx
sub eax, eax
cpuid ; serialize
pop edx
pop eax
pop ebx
ret
ReadClock ENDP
I was wondering when having ReadClock function to perform time
measurement. Is there any posibility that the time stamp counter will
overflow (i.e., edx:eax is alreay holding the maximum value, the next
clock cycle, it will reset to 0), hence giving inaccurate time
measurement result?
Thank you
yccheok
.
- Follow-Ups:
- Re: ReadClock question - Possible overflow?
- From: randyhyde@xxxxxxxxxxxxx
- Re: ReadClock question - Possible overflow?
- From: f0dder
- Re: ReadClock question - Possible overflow?
- Prev by Date: Re: Hay Betov, hitting the big time at last ?
- Next by Date: Re: ReadClock question - Possible overflow?
- Previous by thread: Hay Betov, hitting the big time at last ?
- Next by thread: Re: ReadClock question - Possible overflow?
- Index(es):
Relevant Pages
|