Skip to Main Content
Delphi High Performance
book

Delphi High Performance

by Primož Gabrijelčič
February 2018
Intermediate to advanced content levelIntermediate to advanced
336 pages
7h 52m
English
Packt Publishing
Content preview from Delphi High Performance

Implementing a timer

If you play with the demo application, you'll soon find that it works fine, just not exactly as I described before. I stated that "(the code) sends pingMsg back to the owner every five seconds." As the following image shows, that isn't exactly so.

This image shows one short testing session. During the testing, I started the thread. That caused two messages to be logged. The initial value of 0 is sent from the thread immediately when the thread is started. After that, the main thread sent a new value 42 to the worker thread, and that resulted in an immediate ping response.

After that, I didn't click anything for 11 seconds, which generated two ping messages, each sent 5 seconds after the previous message. Next, I clicked ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Delphi Cookbook

Delphi Cookbook

Daniele Teti

Publisher Resources

ISBN: 9781788625456Supplemental Content