I am trying to add a callback using g_timeout_add ( timevalue , Func, values passed in Func) to get some status or print something after timevalue.
I am not able to see it. Do I have to call a main loop also? OR any other type of function to get it working ?
Yes, you need a main-loop as well. This can be either implicit (e.g. in a gtk+ app it's created for you), or explicitly (use g_main_loop_new and g_main_loop_run), ie:
g_timeout_add
is a wrapper for creating aGSouce
which will be used/worked on in the mainloop. So commonly aGMainLoop
is run, or in more complex cases,g_main_loop_iteration
(or similar) is called in a loop.