Use g_get_current_time() insted of gettimeofday().