Re: rdtsc vs. GetTickCount()
- From: "Rudy Velthuis [TeamB]" <velthuis@xxxxxxxxx>
- Date: Sun, 28 Aug 2005 15:54:39 +0200
At 15:41:08, 28.08.2005, Bruce McGee wrote:
> The following function (from the MM Challenge) does not compile in
> Delphi 5. Is it save to replace this with GetTickCount for
> compatibility, or will that cause problems?
>
> function GetCPUTicks: Int64;
> asm
> rdtsc;
> end;
GetTickCount will not give you the same number. It has a very, very
different granularity.
RDTSC was not known to the D5 compiler. You can probably emulate it with
asm
dw $310F
end;
--
Rudy Velthuis [TeamB] http://velthuis.homepage.t-online.de
"Never interrupt your enemy when he is making a mistake."
- Napoleon Bonaparte (1769-1821)
.
- Follow-Ups:
- Re: rdtsc vs. GetTickCount()
- From: Sasa Zeman
- Re: rdtsc vs. GetTickCount()
- References:
- rdtsc vs. GetTickCount()
- From: Bruce McGee
- rdtsc vs. GetTickCount()
- Prev by Date: Re: rdtsc vs. GetTickCount()
- Next by Date: Re: FastCode - IntToStr B&V v0.12
- Previous by thread: Re: rdtsc vs. GetTickCount()
- Next by thread: Re: rdtsc vs. GetTickCount()
- Index(es):
Relevant Pages
|