On Tue, 21 Jun 2016 20:51:10 GMT, dan hitt wrote:

Can somebody point me to an example gtkd program that has an object of class Timeout in it?

I want to code up an action to repeatedly take place (under some conditions) and i think a Timeout would be ideal. (Something like a button gets pressed, it creates a timeout, and then does the action at the end of the timeout, and repeats until the button is released.)

I can sort of guess around about how it might be done, but if there's an existing gtkd program that does it, then i would prefer to take a look at that first. And this is so common, i'm sure there must be one, but i can't seem to google around well enough to find it.

TIA for any pointers or other advice!

dan

I use a timeout in but it's a fairly large code base rather then a simple example, hopefully it's of use anyway.

https://github.com/gnunn1/terminix/blob/master/source/gx/terminix/terminal/terminal.d