mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
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.
This commit is contained in:
parent
b2e8bbe9e9
commit
ef2a94de93
@ -52,8 +52,9 @@
|
|||||||
gint64 __budget = master_clock->remaining_budget; \
|
gint64 __budget = master_clock->remaining_budget; \
|
||||||
if (__budget > 0 && __delta >= __budget) { \
|
if (__budget > 0 && __delta >= __budget) { \
|
||||||
_clutter_diagnostic_message ("%s took %" G_GINT64_FORMAT " microseconds " \
|
_clutter_diagnostic_message ("%s took %" G_GINT64_FORMAT " microseconds " \
|
||||||
"over a budget of %" G_GINT64_FORMAT " microseconds", \
|
"more than the remaining budget of %" G_GINT64_FORMAT \
|
||||||
section, __delta, __budget); \
|
" microseconds", \
|
||||||
|
section, __delta - __budget, __budget); \
|
||||||
} } G_STMT_END
|
} } G_STMT_END
|
||||||
#else
|
#else
|
||||||
#define clutter_warn_if_over_budget(master_clock,start_time,section)
|
#define clutter_warn_if_over_budget(master_clock,start_time,section)
|
||||||
|
Loading…
Reference in New Issue
Block a user