- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Inside parallelhashlist.zip i have put a new timer.pas that compiles correctly
under both Win32 and Win64, i have changed the Tick method inside
timer.pas and added the 64 bits parts so that it works correctly under
Win64:
Here is the new Tick method:
----
function TLkBaseTimer.Tick: int64; register;
//asm
// rdtsc;
//db 0fh, 31h
//end;
asm
rdtsc
{$IFDEF CPU64}
shl rdx, 32
or rax, rdx
{$ENDIF CPU64}
end; { GetCPUTimeStamp }
//asm
// rdtsc;
//db 0fh, 31h
//end;
asm
rdtsc
{$IFDEF CPU64}
shl rdx, 32
or rax, rdx
{$ENDIF CPU64}
end; { GetCPUTimeStamp }
--
How to use the timer to time in microseconds ?
Like this:
Call Timestart() first like this:
HPT.Timestart;
and after that you can write the Time in microseconds like this
writeln('Time in microseconds: ',hpt.TimePeriod);
Please look inside test1.pas inside parallelhashlist.zip i have given you
an example on how to use timer.pas to time the throuput of your
multithreaded
program...
Sincerely,
Amine Moulay Ramdane,
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page