Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #2051 > unrolled thread

About timer.pas ...

Started by"aminer" <aminer@videotron.ca>
First post2012-08-10 13:21 -0500
Last post2012-08-10 13:21 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.programming


Contents

  About timer.pas ... "aminer" <aminer@videotron.ca> - 2012-08-10 13:21 -0500

#2051 — About timer.pas ...

From"aminer" <aminer@videotron.ca>
Date2012-08-10 13:21 -0500
SubjectAbout timer.pas ...
Message-ID<k03fub$jl8$1@dont-email.me>
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 }

--


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...

You can download parallelhashlist from:


http://pages.videotron.com/aminer/


Sincerely,
Amine Moulay Ramdane,


















[toc] | [standalone]


Back to top | Article view | comp.programming


csiph-web