Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
I use a timer to call a procedure every 16ms. On my pc this works ok. But on another pc (cyrix 700mhz) it seems to mis half the calls. Is there a pc (speed) independent timer? It seems that 16ms is not equal on all pc's?
Thanks for your answer in advance!
I accidently made a 'gast' message. That one my be deleted.
Registriert: Do Sep 25, 2003 15:56 Beiträge: 7804 Wohnort: Sachsen - ERZ / C
Programmiersprache: Java (, Pascal)
I think most Timers demand on Processorspeed. Maybe it's possible to Call the Processorspeed and then you're able to calculate it.
May you have to write your own function for this...
Sometimes a man has to do, what men have to do...
_________________ Blog: kevin-fleischer.de und fbaingermany.com
The most exact timer value can be retrieved by using QueryPerformanceCounter and QueryPerformanceFrequence. The resolution of the Delphi TTimer component is only 55ms.
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
i have a look at QueryPerformanceCounter and QueryPerformanceFrequence.
yesterday if found the threader timer from http://www.carlosb.com on torry. It seems to do the trick also. It does not use a timer but uses the timing from a thread.
It is also interesting that procedures called by a timer with an interval about 10 ms are called more often, when you move the cursor on the taskbar or the sourcecode of your application in delphi.
Mitglieder in diesem Forum: 0 Mitglieder und 12 Gäste
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.