diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-08-13 19:11:00 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2017-08-13 19:11:00 +0200 |
| commit | 5f68cf21b47b88e4e1de7fed7bd9b8b56b5dfa3d (patch) | |
| tree | 5571df47d1e938e51d204372a7fa874b343313a9 /src/PerformanceMeasure.cs | |
| parent | 8776ccb3ca259053c2b93b0a068b76a9bf8032f3 (diff) | |
cairo.region to handle clipping, native pointer leaking...
Diffstat (limited to 'src/PerformanceMeasure.cs')
| -rw-r--r-- | src/PerformanceMeasure.cs | 21 |
1 files changed, 12 insertions, 9 deletions
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(); } } } |