diff options
Diffstat (limited to 'src/core/screen.c')
-rw-r--r-- | src/core/screen.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/core/screen.c b/src/core/screen.c index 78a41d83..feaac951 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -2607,7 +2607,7 @@ remove_sequence (MetaScreen *screen, typedef struct { GSList *list; - GTimeVal now; + gint64 now; } CollectTimedOutData; /* This should be fairly long, as it should never be required unless @@ -2623,14 +2623,15 @@ collect_timed_out_foreach (void *element, { CollectTimedOutData *ctod = data; SnStartupSequence *sequence = element; - long tv_sec, tv_usec; double elapsed; - sn_startup_sequence_get_last_active_time (sequence, &tv_sec, &tv_usec); + time_t tv_sec; + suseconds_t tv_usec; + gint64 tv; - elapsed = - ((((double)ctod->now.tv_sec - tv_sec) * G_USEC_PER_SEC + - (ctod->now.tv_usec - tv_usec))) / 1000.0; + sn_startup_sequence_get_last_active_time (sequence, &tv_sec, &tv_usec); + tv = (tv_sec * G_USEC_PER_SEC) + tv_usec; + elapsed = (ctod->now - tv) / 1000.0; meta_topic (META_DEBUG_STARTUP, "Sequence used %g seconds vs. %g max: %s\n", @@ -2649,7 +2650,8 @@ startup_sequence_timeout (void *data) GSList *tmp; ctod.list = NULL; - g_get_current_time (&ctod.now); + + ctod.now = g_get_real_time (); g_slist_foreach (screen->startup_sequences, collect_timed_out_foreach, &ctod); |