Recent

Author Topic: [SOLVED]Trying to find/download EpikTimer  (Read 540 times)

tfurnivall

  • New Member
  • *
  • Posts: 49
[SOLVED]Trying to find/download EpikTimer
« on: June 19, 2025, 04:34:27 pm »
I'm trying to get at the EpikTimer - which seems (by consensus) to be the best timer out there for Lazarus and FPC. Unfortunately my total ignorance of GitHuib and other Good and Useful Products is makign this an issue.

If I go to the EpikTime page on Free Pascal Wiki, and look under the sub-heading I see:
Quote
If you don't want to install a Git client, Github also allows you to download the latest code as a ZIP archive. Simply go to the Github EpikTimer url and click the "Download ZIP" button on the right.


However, when I follow the link, there is no "Download ZIP button" on the right.

The code appears (mostly) to be vintage and well-matured, so I suspect that GitHub may have changed around it. However, I feel like I'm floundering around in the shallow end of a kid's swimming pool without any idea of what I'm doing!
(I don't like that feeling)

Can some one give me some one-syllable at a time instructions to get EpikTimer onto my system and available for use in Lazarus? (I looked at FPTimer, but other than telling me all the internals (which I didn't get), there's nothing to indicate which group (RT:? PROG? LCL? whatever) the unit is located in! My bad, I know, but I'd like to get this 'little' project finished, and I need a timer!

Thanks,

Tony
« Last Edit: June 20, 2025, 02:28:21 pm by tfurnivall »

Thaddy

  • Hero Member
  • *****
  • Posts: 17451
  • Ceterum censeo Trumpum esse delendum (Tnx Charlie)
Re: Trying to find/download EpikTimer
« Reply #1 on: June 19, 2025, 04:38:44 pm »
I *think* it is in OPM, but not quite sure.
It is also not so epic as its name suggests, though. (You are correct assuming the code to be vintage)
What is your purpose? Maybe there are better alternatives.
Although for beginners it is fine.
« Last Edit: June 19, 2025, 04:41:49 pm by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

tfurnivall

  • New Member
  • *
  • Posts: 49
Re: Trying to find/download EpikTimer
« Reply #2 on: June 19, 2025, 05:08:28 pm »
Thanks for the response, Thaddy, and the implicit reminder that I should have said what I wanted to accomplish.

(Just to maintain some sort of coherent connection to earlier posts). I'm in a LAB environment trying to get the best way to organize units for a Lexical scanner which can be configured for multiple source languages. I'm at the last part - where I can successfully open and close the source file from the lowest level, and was looking for a way to give a lines/second compilation rate:
Code: Pascal  [Select][+][-]
  1. GetTheStartValueOfTheTimer();
  2.  
  3. Dothe Compilation - counting the lines();
  4.  
  5. GetTheEndValueOfTheTimer();
  6.  
  7. CompilationRate := LineCount / (EndValue - Start-Value);
  8.  
  9.  

What I want is a way to get millisecond (or, perhaps, sub-millisecond) discrimination between those two values. Especially since the test sets are rather small!

Any ideas/suggestions?

Tony

wp

  • Hero Member
  • *****
  • Posts: 12913
Re: Trying to find/download EpikTimer
« Reply #3 on: June 19, 2025, 05:15:24 pm »
However, when I follow the link, there is no "Download ZIP button" on the right.
I updated the wiki page, and added a note that you can also install the package via Online-Package-Manager (OPM).

tfurnivall

  • New Member
  • *
  • Posts: 49
Re: Trying to find/download EpikTimer
« Reply #4 on: June 19, 2025, 08:43:56 pm »
Thanks, wp,

When confronted with a new, and very strange, situation, I become very literal! And I have a strongly developed fear of just clicking a button to see what might happen!

I got the ZIP file downloaded, and unzipped it, which gave me a whole load of files with not much guidance, so I tried your additional suggestion
Quote
A possibly slightly modified version is availabe also via the Online Package Manager (OPM) of Lazarus.

That was fun! Everything flashed by very fast. So fast,in fact that I didn't see Lazarus close down my project and then start rebuilding Lazarus, and then (really nifty) re-open my project when, mirabile dictu, there is now an EpikTimer in the System controls. I can't persuade it to yield up any events to me, so I'll try using some of the examples that I've seen associated with the EpikTimer.

(Pause for some coding)

Back again. No idea how to gain access to the timer without the events for the control on my form. What has happened so far is very impressive - but leaves me with no net increase in understanding. Time for some reading (and maybe a nap...)

Thanks, again, wp

Tony

dbannon

  • Hero Member
  • *****
  • Posts: 3421
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Trying to find/download EpikTimer
« Reply #5 on: June 20, 2025, 06:21:34 am »
How about -
Code: Pascal  [Select][+][-]
  1.  
  2. var Tick, Tock : qword;
  3. begin
  4. ....
  5. Tick := gettickcount64();          // GetTheStartValueOfTheTimer();
  6. Dothe Compilation - counting the lines();
  7. Tock := gettickcount64();          // GetTheEndValueOfTheTimer();
  8. writeln('OK, that took ', Tock - Tick, 'mS');
  9. // CompilationRate := LineCount / (EndValue - Start-Value);
  10.  

e&oe
Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

tfurnivall

  • New Member
  • *
  • Posts: 49
Re: Trying to find/download EpikTimer
« Reply #6 on: June 20, 2025, 02:28:03 pm »
Just what I was looking for! No idea where GetClockTicks64 comes from, but I'm working on the assumption that it is a millisecond timer.  Now the problem is to get a large enough test file that I'm not confronted with an elapsed time of 0ms!

(I'd forgotten that Lazarus/FPC give native code executables, not the VBA JIT compilation and interpretation).

Thanks to all who made suggestions. I'll report back on the underlying hypothesis that I was testing in a different post.

Tony

 

TinyPortal © 2005-2018