diff options
author | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2019-08-14 02:10:09 +0300 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2019-08-14 02:10:09 +0300 |
commit | 11725dc5043f8b63cba462894af848e26e6b409e (patch) | |
tree | 189732bfa72b5c79239e2c2be30cfffc4afa3fbb /src/core/screen.c | |
parent | 82f741eb3ef2f65b882a1e8f813ca6ef6de4cf9f (diff) | |
download | metacity-11725dc5043f8b63cba462894af848e26e6b409e.tar.gz |
screen: avoid deprecated g_get_current_time
Diffstat (limited to 'src/core/screen.c')
-rw-r--r-- | src/core/screen.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/screen.c b/src/core/screen.c index aec8f11f..64143633 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -2411,7 +2411,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 @@ -2432,9 +2432,7 @@ collect_timed_out_foreach (void *element, sn_startup_sequence_get_last_active_time (sequence, &tv_sec, &tv_usec); - elapsed = - ((((double)ctod->now.tv_sec - tv_sec) * G_USEC_PER_SEC + - (ctod->now.tv_usec - tv_usec))) / 1000.0; + elapsed = (ctod->now - (tv_sec * G_USEC_PER_SEC + tv_usec)) / 1000.0; meta_topic (META_DEBUG_STARTUP, "Sequence used %g seconds vs. %g max: %s\n", @@ -2453,7 +2451,7 @@ 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); |