From 5f68cf21b47b88e4e1de7fed7bd9b8b56b5dfa3d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Sun, 13 Aug 2017 19:11:00 +0200 Subject: cairo.region to handle clipping, native pointer leaking... --- src/PerformanceMeasure.cs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'src/PerformanceMeasure.cs') diff --git a/src/PerformanceMeasure.cs b/src/PerformanceMeasure.cs index 1db29e30..3c978e8b 100644 --- a/src/PerformanceMeasure.cs +++ b/src/PerformanceMeasure.cs @@ -58,14 +58,16 @@ namespace Crow computeStats (); } public void NotifyChanges(){ - if (cptMeasures == 0) - return; - NotifyValueChanged("minimum", minimum); - NotifyValueChanged("maximum", maximum); - NotifyValueChanged("current", current); - // NotifyValueChanged("total", total); - // NotifyValueChanged("cptMeasures", cptMeasures); - NotifyValueChanged("mean", total / cptMeasures); + lock(this){ + if (cptMeasures == 0) + return; + NotifyValueChanged("minimum", minimum); + NotifyValueChanged("maximum", maximum); + NotifyValueChanged("current", current); + // NotifyValueChanged("total", total); + // NotifyValueChanged("cptMeasures", cptMeasures); + NotifyValueChanged("mean", total / cptMeasures); + } } void computeStats(){ @@ -85,7 +87,8 @@ namespace Crow minimum = long.MaxValue; } void onResetClick(object sender, MouseButtonEventArgs e){ - ResetStats(); + lock(this) + ResetStats(); } } } -- cgit v1.3.1-4-g156e