Commit 5e1389f1 authored by Alberts Muktupāvels's avatar Alberts Muktupāvels
Browse files

tasklist: avoid deprecated g_get_current_time

parent 25f670a2
Pipeline #113726 passed with stage
in 20 minutes and 36 seconds
...@@ -381,15 +381,12 @@ wnck_task_class_init (WnckTaskClass *klass) ...@@ -381,15 +381,12 @@ wnck_task_class_init (WnckTaskClass *klass)
static gboolean static gboolean
wnck_task_button_glow (WnckTask *task) wnck_task_button_glow (WnckTask *task)
{ {
GTimeVal tv;
gdouble now; gdouble now;
gfloat fade_opacity, loop_time; gfloat fade_opacity, loop_time;
gint fade_max_loops; gint fade_max_loops;
gboolean stopped; gboolean stopped;
g_get_current_time (&tv); now = g_get_real_time () / G_USEC_PER_SEC;
now = (tv.tv_sec * (1.0 * G_USEC_PER_SEC) +
tv.tv_usec) / G_USEC_PER_SEC;
if (task->glow_start_time <= G_MINDOUBLE) if (task->glow_start_time <= G_MINDOUBLE)
task->glow_start_time = now; task->glow_start_time = now;
...@@ -4317,11 +4314,11 @@ sequence_timeout_callback (void *user_data) ...@@ -4317,11 +4314,11 @@ sequence_timeout_callback (void *user_data)
{ {
WnckTasklist *tasklist = user_data; WnckTasklist *tasklist = user_data;
GList *tmp; GList *tmp;
GTimeVal now; gint64 now;
long tv_sec, tv_usec; long tv_sec, tv_usec;
double elapsed; double elapsed;
g_get_current_time (&now); now = g_get_real_time ();
restart: restart:
tmp = tasklist->priv->startup_sequences; tmp = tasklist->priv->startup_sequences;
...@@ -4332,9 +4329,7 @@ sequence_timeout_callback (void *user_data) ...@@ -4332,9 +4329,7 @@ sequence_timeout_callback (void *user_data)
sn_startup_sequence_get_last_active_time (task->startup_sequence, sn_startup_sequence_get_last_active_time (task->startup_sequence,
&tv_sec, &tv_usec); &tv_sec, &tv_usec);
elapsed = elapsed = (now - (tv_sec * G_USEC_PER_SEC + tv_usec)) / 1000.0;
((((double)now.tv_sec - tv_sec) * G_USEC_PER_SEC +
(now.tv_usec - tv_usec))) / 1000.0;
if (elapsed > STARTUP_TIMEOUT) if (elapsed > STARTUP_TIMEOUT)
{ {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment