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?

1 answer

  • answered 2018-04-18 14:43 jku

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