Temporal.Statistic.sumLong()

Signature

long sumLong(PropertyAtomLong pal, long stime, long etime, int sample_rate, boolean bound_by_stime)

Domain

condition, action, query

Description

This method returns the sum of values in the history of a property atom over a given time interval [stime, etime].

Parameters

NameTypeDescription
palPropertyAtomLongThe property to check for the value of.
stimelongstart time of the interval, 0 means use oldest value's timestamp as start time.
etimelongend time of the interval, 0 means use newest value's timestamp as end time.
sample_rateintsample rate for the interval should be greater than 0.
bound_by_stimebooleantrue implies for stime less than oldest value's time stamp[t0] use t0.

Returns

TypeDescription
longsum of all the values sampled using the above parameters.

Cautions

If the values are too large the sum might overflow, also if value did not exist thourgh entire interval an exception is thrown. 'interval' precision is in milliseconds.