Solved

timers

Posted on 1998-10-19
2
155 Views
Last Modified: 2010-04-06
Hi! When my program starts i take a start time, then every second i take the current time, then
i show the difference as a duration in a label.The problem is every so often it fails to
show a second, even though it still keeps the correct duration, i understand this may be the
windows is because of its pre-emptive nature, is there a way i can stop this from happening
so often.
De
0
Comment
Question by:dapple
2 Comments
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 80 total points
ID: 1343337
If it is important to you that the duration is as close to one second as possible then you should look at using a multimedia timer.

Look at timeSetEvent and timeKillEvent.

You can use timeSetEvent to start a timer to call a callback function with millisecond accuracy if you want.

Cheers,

Raymond.
0
 
LVL 1

Author Comment

by:dapple
ID: 1343338
cool thanks for your help
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question