diff options
author | Ryan Lortie <desrt@desrt.ca> | 2010-11-03 08:26:27 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2010-11-03 08:26:27 -0400 |
commit | fbdcf193ae485cb311b31ed9ab1d69d69701598d (patch) | |
tree | 3bf64f57543ba55e936bb78599912e1e592d7136 /gtk/gtktoolitemgroup.c | |
parent | 1f1e7c37ad31f0eefb525129775ac40c161bdba0 (diff) | |
download | gtk+-fbdcf193ae485cb311b31ed9ab1d69d69701598d.tar.gz |
gtktoolitemgroup: don't use GTimeSpec
Use gint64 time instead.
Diffstat (limited to 'gtk/gtktoolitemgroup.c')
-rw-r--r-- | gtk/gtktoolitemgroup.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c index a1f4b052d2..f095f80aa0 100644 --- a/gtk/gtktoolitemgroup.c +++ b/gtk/gtktoolitemgroup.c @@ -1798,10 +1798,8 @@ gtk_tool_item_group_set_header_relief (GtkToolItemGroup *group, static gint64 gtk_tool_item_group_get_animation_timestamp (GtkToolItemGroup *group) { - GTimeSpec now; - - g_source_get_time (group->priv->animation_timeout, &now); - return (now.tv_sec * G_USEC_PER_SEC + now.tv_nsec / 1000 - group->priv->animation_start) / 1000; + return (g_source_get_time (group->priv->animation_timeout) - + group->priv->animation_start) / 1000; } static void @@ -1924,14 +1922,10 @@ gtk_tool_item_group_set_collapsed (GtkToolItemGroup *group, { if (priv->animation) { - GTimeSpec now; - - g_get_monotonic_time (&now); - if (priv->animation_timeout) g_source_destroy (priv->animation_timeout); - priv->animation_start = (now.tv_sec * G_USEC_PER_SEC + now.tv_nsec / 1000); + priv->animation_start = g_get_monotonic_time (); priv->animation_timeout = g_timeout_source_new (ANIMATION_TIMEOUT); g_source_set_callback (priv->animation_timeout, |