diff options
author | Richard Linden <none@none> | 2012-10-09 18:02:47 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-10-09 18:02:47 -0700 |
commit | aff9654c1115b4a74fc3ee8f9ca2c2ffa07f8d73 (patch) | |
tree | 4cbd07cad7b3d912324aee7513fb5462bab9d13b /indra/llcommon/llunit.h | |
parent | 3960fdf9e01619ddfd7903bcdd8d894f432752d0 (diff) |
SH-3275 WIP Update viewer metrics system to be more flexible
added PeriodicRecorder class for frame by frame stats accumulation
Diffstat (limited to 'indra/llcommon/llunit.h')
-rw-r--r-- | indra/llcommon/llunit.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llcommon/llunit.h b/indra/llcommon/llunit.h index 9d78df7cae..52b837fdc3 100644 --- a/indra/llcommon/llunit.h +++ b/indra/llcommon/llunit.h @@ -44,13 +44,19 @@ struct LLUnit : public BASE_UNIT : BASE_UNIT(convertToBase(value)) {} - operator value_t() { return get(); } + operator value_t() { return value(); } - value_t get() const + value_t value() const { return convertToDerived(mValue); } + template<typename CONVERTED_TYPE> + value_t value() const + { + return CONVERTED_TYPE(*this).value(); + } + static value_t convertToBase(value_t derived_value) { return (value_t)((F32)derived_value * DERIVED_UNIT::conversionToBaseFactor()); @@ -84,7 +90,7 @@ struct LLUnit<T, T> return *this; } - value_t get() { return mValue; } + value_t value() { return mValue; } static value_t convertToBase(value_t derived_value) { |