Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

Count Down Timer

I need code for a count down timer.

Must be able to count down in the format HH:MM:SS in 1 second increments.

Must manage times outside of 24 hours - for example count down from 76:00:00

Thanks
0
delphinewbie
Asked:
delphinewbie
1 Solution
 
calinutzCommented:
You need to build a function that transforms your time data (HH:MM:SS) into Seconds
function toseconds(S:String):integer;
begin
....
end;

Then place a TTimer on the form and ontimer event place a call to this function that will return number of seconds , substract one second from it and then call a function/procedure that will output the number of seconds in the format that you need in an editbox or something.

Procedure secToFormat(finalseconds);
begin
...
end;

And of course Timer must have interval=1000

There could be delays considering the time to execute the functions, but to avoit that you could syncronize the timer with the system time
0
 
DavidBirch2dotComCommented:
http://www.programmersheaven.com/zone2/cat726/5865.htm

looks like a decent component you could use for this purpose

David
0
 
delphinewbieAuthor Commented:
I found what I was looking for by way of a component.
Freeware by BenoƮt Standaert - http://delphi.icm.edu.pl/authors/a0003797.htm

David your link is to 16 bit component.
0
 
DavidBirch2dotComCommented:
>David your link is to 16 bit component.
whopps ;)

you might want to post in community support to get this Q refunded

David
0
 
OzzModCommented:
Closed, 125 points refunded.
OzzMod
Community Support Moderator (Graveyard shift)
0

Featured Post

Technology Partners: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now