measuring time between two buttonclicks



I'm expermimenting a bit with GTK and I wanted to measure the time
interval between two clicks on a button. I figured out that I had to use
a GTimer provided by GLib.

The first time the button is clicked, it should initialize and start the
timer. The second time however, the GTimer should be stopped and the
interval should be calculated with the appropriate function...

How can I construct my callback so that I can execute this piece of code
on the first click and that piece of code on the second click??

cheers, Thomas

-- 
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]