Solved

timers

Posted on 1998-10-19
2
157 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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…

756 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