summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2014-04-14 22:23:36 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2014-04-14 22:24:47 +0100
commitef2a94de9352de550b7837d2474aab118bea1bd0 (patch)
tree18a646497d3edd3c154f235fae6a8d73a845cf6a
parentb2e8bbe9e9ce3bc1573d5dc69b8dc18c5d4538f2 (diff)
downloadclutter-ef2a94de9352de550b7837d2474aab118bea1bd0.tar.gz
master-clock: Clean up the over-budget diagnostic
Use the difference between the elapsed time and the available budget, so that the message can be read more easily.
-rw-r--r--clutter/clutter-master-clock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clutter/clutter-master-clock.c b/clutter/clutter-master-clock.c
index 104ea0c81..e0506779e 100644
--- a/clutter/clutter-master-clock.c
+++ b/clutter/clutter-master-clock.c
@@ -52,8 +52,9 @@
gint64 __budget = master_clock->remaining_budget; \
if (__budget > 0 && __delta >= __budget) { \
_clutter_diagnostic_message ("%s took %" G_GINT64_FORMAT " microseconds " \
- "over a budget of %" G_GINT64_FORMAT " microseconds", \
- section, __delta, __budget); \
+ "more than the remaining budget of %" G_GINT64_FORMAT \
+ " microseconds", \
+ section, __delta - __budget, __budget); \
} } G_STMT_END
#else
#define clutter_warn_if_over_budget(master_clock,start_time,section)