From 612892b45a3413b16e40c49d3bfde77a4ca927fd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Sun, 18 Aug 2013 22:30:27 -0700 Subject: SH-4433 WIP: Interesting: Statistics > Ping Sim is always 0 ms continued conversion to units system made units perform type promotion correctly and preserve type in arithmetic e.g. can now do LLVector3 in units added typedefs for remaining common unit types, including implicits --- indra/llui/llstatbar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/llui') diff --git a/indra/llui/llstatbar.cpp b/indra/llui/llstatbar.cpp index 4c64cc944e..03a2895289 100755 --- a/indra/llui/llstatbar.cpp +++ b/indra/llui/llstatbar.cpp @@ -253,7 +253,7 @@ template S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const T& stat, const F32Seconds time_period) { F32Seconds elapsed_time, - time_since_value_changed; + time_since_value_changed; S32 num_rapid_changes = 0; const F32Seconds RAPID_CHANGE_THRESHOLD = F32Seconds(0.3f); @@ -266,7 +266,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const if (last_value != cur_value) { if (time_since_value_changed < RAPID_CHANGE_THRESHOLD) num_rapid_changes++; - time_since_value_changed = 0; + time_since_value_changed = (F32Seconds)0; } last_value = cur_value; @@ -280,7 +280,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const LLTrace::TraceType& stat, const F32Seconds time_period) { F32Seconds elapsed_time, - time_since_value_changed; + time_since_value_changed; S32 num_rapid_changes = 0; F64 last_value = periodic_recording.getPrevRecording(1).getSum(stat); @@ -292,7 +292,7 @@ S32 calc_num_rapid_changes(LLTrace::PeriodicRecording& periodic_recording, const if (last_value != cur_value) { if (time_since_value_changed < RAPID_CHANGE_THRESHOLD) num_rapid_changes++; - time_since_value_changed = 0; + time_since_value_changed = (F32Seconds)0; } last_value = cur_value; @@ -355,7 +355,7 @@ void LLStatBar::draw() mean = frame_recording.getPeriodMean(sample_stat, num_frames); num_rapid_changes = calc_num_rapid_changes(frame_recording, sample_stat, RAPID_CHANGE_WINDOW); - if (num_rapid_changes / RAPID_CHANGE_WINDOW > MAX_RAPID_CHANGES_PER_SEC) + if (num_rapid_changes / RAPID_CHANGE_WINDOW.value() > MAX_RAPID_CHANGES_PER_SEC) { display_value = mean; } -- cgit v1.2.3