Recent

Author Topic: epiktimer on different computers  (Read 3484 times)

jamie

  • Hero Member
  • *****
  • Posts: 7607
Re: epiktimer on different computers
« Reply #15 on: December 11, 2020, 01:19:17 pm »
Both my I5 Pc's have 10M pps..(parts per second)

while my old AMD with windows 2k on it has a little over 3.xxxxx M..

I think either would be sufficient for a time difference wouldn't you say ?
The only true wisdom is knowing you know nothing

bd4kc

  • New Member
  • *
  • Posts: 46
Re: epiktimer on different computers
« Reply #16 on: December 11, 2020, 03:39:12 pm »
The computer that went wrong is I7-4720HQ, laptop, Lenovo Y50. Other computers are somewhat higher than this configuration, some are very old (a decade ago low-power cpu), CPU has intel and amd, are correct. In addition, all machines are randomly selected, and all operating systems are not specifically set up and are not battery-powered.

jamie

  • Hero Member
  • *****
  • Posts: 7607
Re: epiktimer on different computers
« Reply #17 on: December 11, 2020, 05:12:16 pm »
I really don't understand how this helps you ?

querying the counter info is not going to give you a consistent interval because the OS in it self will loaf along giving your app attention and meanwhile the counter is running on its own in the background.

 I guess if you want to test your OS response priority to your application you can use this data but other than that ?

Also, each PC will be different because this timer starts at boot time and the counter values even if the same PC's won't never be the same unless you have two identical setups and even then, the clock on one will be different on the other most likely.

Most PC's have a TOD clock in them that are battery operated. The resolution may not be no where near as high but most of them track pretty close.
The only true wisdom is knowing you know nothing

bd4kc

  • New Member
  • *
  • Posts: 46
Re: epiktimer on different computers
« Reply #18 on: December 11, 2020, 09:01:19 pm »
Both my I5 Pc's have 10M pps..(parts per second)

while my old AMD with windows 2k on it has a little over 3.xxxxx M..

I think either would be sufficient for a time difference wouldn't you say ?

I think I'm a little obsessive, always remember not use getsystemticks, always to avoid this problem with elapsed. A little afraid, if I use getsystemticks, testing 10 machines is good, there is no guarantee that the program can run everywhere. If this does happen, the computer solves the problem, and the computer can not find the difference between the two, this is a potential trap, will lead to a ignorant theory.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8551
Re: epiktimer on different computers
« Reply #19 on: December 11, 2020, 09:31:45 pm »
... there is no guarantee that the program can run everywhere.

And there is even less guarantee that the schedulers on two different computers will run similarly. All it takes is a CPU stepping difference, different amount of RAM, different services/daemons running and all of your assumptions are broken.

Have you come across the problem yet where some Windows 10 settings are different depending on the provenance of the installation image? There really are limits as to how obsessive you can be with this stuff, and sometimes the best place to start is with a question somewhere appropriate along the lines of "I'm planning to use EpikTimer to do such-and-such... is anybody aware of any relevant issues?".

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: epiktimer on different computers
« Reply #20 on: December 12, 2020, 12:55:52 am »

I think I'm a little obsessive


Yes you are. And read the comment from MarkMLI twice.

What you need is a high end hardware clock.

The hardware of the exactly the same type of PC can differ up  and down to 10%.
Otherwise they were not so cheap.

Nor Windows  neither Linux were designed to be a realtime system.
Some decades ago when machines were slow the old Unix joke was:
"This OS is designed to fullfill the jobs in finite time"

How will you be shure that while you measure a cron job in the background just started the backup?
Or a windows system just started to enlarge the swap file?
And hundreds more of those situations?

As you said:  this is a potential trap, will lead to a ignorant theory.

So buy a high end hardware clock.
What you try is not for these Operating Systems.
And not a software job.

If you don't like  a hardware clock then move to a realtime Operating System.
They are not cheap and designed for industrial use.

Winni
 

jamie

  • Hero Member
  • *****
  • Posts: 7607
Re: epiktimer on different computers
« Reply #21 on: December 12, 2020, 01:09:21 am »
The only timer interval I can trust on a standard PC is the sound card buffer reads and that is when using them to gather information via the sound card ADC because it runs standalone from your software gathering info at fixed intervals and your app can stall a bit before reading it without loss to data..

 The only problem I've run into is using those cheap USB sound dongles. The phrase, "You get what you pay for" is 100% accurate!

The only true wisdom is knowing you know nothing

bd4kc

  • New Member
  • *
  • Posts: 46
Re: epiktimer on different computers
« Reply #22 on: December 12, 2020, 02:21:50 pm »
I read and studied the reply of all my friends seriously. Also want to experiment more, borrowed a rather expensive computer, Microsoft's surface pro new model. Getsystemticks results are the same as Y50. Then, still unsymered, I replaced the Y50 hard drive, installed a win7 64 bit, the new system only installed device drivers, still the same results.

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: epiktimer on different computers
« Reply #23 on: December 12, 2020, 03:58:44 pm »
Bravo Don Quichotte!

Keep on fighting against the windmills!

Winni


PS.:

Code: Pascal  [Select][+][-]
  1. repeat
  2.  
  3. goto reply#19
  4.  
  5. until understood;
  6.  
« Last Edit: December 12, 2020, 04:04:08 pm by winni »

bd4kc

  • New Member
  • *
  • Posts: 46
Re: epiktimer on different computers
« Reply #24 on: December 12, 2020, 05:35:26 pm »
Haha, is not changed to discuss CPU, an i3 10th generation computer, is the most responsive I use, is the normal value. Isn't the i7 computer ticks slow? Both abnormal ticks computers are i7, 4th generation and the latest generation. Can I tell if a computer is advanced in this way? Jamie's 15 PCs are not advanced,  :P I have one advanced and three low-level.

MarkMLl

  • Hero Member
  • *****
  • Posts: 8551
Re: epiktimer on different computers
« Reply #25 on: December 12, 2020, 06:06:41 pm »
Can I tell if a computer is advanced in this way?

Yes, get the CPU reference manuals from Intel. However you will /still/ find that there's a lot of additional variability depending on peculiarities of the OS etc.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018