Search code examples
gtkglib

Change g_timeout_add_seconds to something with 0.5 second


g_timeout_add_seconds(1, (GSourceFunc) update_status_tray, NULL);

The above code will refresh the status tray every second, but I need to refresh it every half second. How to change this line to get 0.5 second?


Solution

  • g_timeout_add(500, (GSourceFunc) update_status_tray, NULL);