GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Oct 24, 2014 9:19 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: timer!!
PostPosted: Wed Dec 28, 2011 10:20 am 
Offline
GTK+ Geek

Joined: Sun Apr 03, 2011 11:12 am
Posts: 63
hello everyone, I want a timer like widget. This will call a specific function, after a specified interval. I have used the GTimer, but it wasn't suitable for my needs. Also, I have tried with loops, like this
Code:
while(get_time_elapsed==interval)
    run a given function

but it will continously use the CPU.
Any idea, of create a widget, which will emit a signal after a specified interval.
Thanks in advance :)


Top
 Profile  
 
 Post subject: Re: timer!!
PostPosted: Wed Dec 28, 2011 11:11 am 
Offline
GTK+ Geek

Joined: Fri Sep 04, 2009 6:53 am
Posts: 68
use g_timeout_add


Top
 Profile  
 
 Post subject: Re: timer!!
PostPosted: Wed Dec 28, 2011 12:30 pm 
Offline
GTK+ Geek

Joined: Sun Apr 03, 2011 11:12 am
Posts: 63
thx for reply!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group