Time Difference

Computes the delta between data point time stamps. E.g. if one data point is at 11:05 and the second at 11:10 the difference reported would be 300 seconds (with a resolution of seconds). Only data points with a numeric value are considered, the node will skip over NaN and null values.

It is best to process raw data with this node as downsampled or interpolated data may be filled and not reflect the actual time deltas.

Fields include:

Name

Data Type

Required

Description

Default

Example

resolution

String

Optional

The resolution used to report the timestamp delta.

SECONDS

MILLIS

Potential values for the resolution string include:

  • HOURS

  • MINUTES

  • SECONDS

  • MILLIS

  • NANOS

They come from the Java ChronoUnit enumeration.

Example:

{
  "id": "diff",
  "type": "TimeDifference",
  "sources": ["m1"],
  "resolution": "SECONDS"
}