Temporal.Statistic.avgOverTimeLong()
Signature
double avgOverTimeLong(PropertyAtomLong pal, long stime, long etime, int sample_interval,
boolean bound_by_stime)
Domain
ACTION, CONDITION, QUERY, BUI
Description
This method calculates the average of samples of the property over a given time interval[stime, etime].
Parameters
Name | Type | Description |
pal | PropertyAtomLong | The property to average the value for. |
stime | long | start time of the interval, 0 means use oldest value's timestamp as start time. |
etime | long | end time of the interval, 0 means use newest value's timestamp as end time. |
sample_interval | int | interval between samples in milliseconds, should be greater than 0. |
bound_by_stime | boolean | true implies for stime less than oldest value's time stamp[t0] use t0. |
Returns
Type | Description |
double | average of all the samples taken. |
Cautions
If value did not exist through the entire interval an exception is thrown.