diff --git a/engine/rateprofile.go b/engine/rateprofile.go index 2daeedadb..70a0d9932 100644 --- a/engine/rateprofile.go +++ b/engine/rateprofile.go @@ -82,6 +82,15 @@ func (rt *Rate) UID() string { return rt.uID } +type IntervalRate struct { + IntervalStart time.Duration // Starting point when the Rate kicks in + Unit time.Duration // RateUnit + Increment time.Duration // RateIncrement + Value float64 // RateValue + + val *utils.Decimal // cached version of the Decimal +} + func (rt *Rate) Compile() (err error) { aTime := rt.ActivationTimes if aTime == utils.EmptyString { @@ -96,39 +105,6 @@ func (rt *Rate) Compile() (err error) { // RunTimes returns the set of activation and deactivation times for this rate on the interval between >=sTime and