<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>There's a <a href="http://www.freepascal.org/contrib/db.php3">contributed
units</a> link on the freepascal.org home page. Perhaps it could go
there. Right under it is a <a
href="http://www.freepascal.org/contrib/add.php3">Contribute</a> link
that allows you to add it to the contributed units database.<br>
<br>
I know this isn't adding it to the base RTL stuff, but it's a start for
now, no?<br>
</tt><br>
Graeme Geldenhuys wrote:
<blockquote
cite="mid:cfcebe780705310636y537e6d47p7ba38f6b4531174d@mail.gmail.com"
type="cite">
<blockquote type="cite">> I guess I'm a bit late in asking, seeing
that I already implemented by
<br>
> own thread based timer. I works 100% for what I need. I just
wondered
<br>
> if there was something like that built into FPC that I missed. I
<br>
> would like to compare the implementations, or share mine if FPC
<br>
> doesn't have one.
<br>
<br>
You're welcome to share yours.
<br>
<br>
Michael.
<br>
</blockquote>
<br>
<br>
Hopefully somebody could find this useful or possibly it could find
<br>
its way into FPC and be the beginnings of a basic timer in FPC. Why
<br>
must everybody always reinvent the wheel. :-)
<br>
<br>
See attached file: threadtimer.pas
<br>
<br>
Usage:
<br>
-----------
<br>
<br>
FTimer := TFPTimer.Create(nil);
<br>
FTimer.OnTimer := @FTimerTimer;
<br>
FTimer.Interval := 500; // in milliseconds
<br>
FTimer.Enabled := False;
<br>
<br>
You can then call functions like:
<br>
FTimer.On;
<br>
FTimer.Off;
<br>
FTimer.Enabled := False;
<br>
<br>
<br>
<pre wrap=""><pre wrap="">
<hr size="4" width="90%">
_______________________________________________
fpc-pascal maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a></pre></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
If you never have the courage to lose sight of the shore,
You'll never know the utter terror of being forever lost at sea</pre>
</body>
</html>