Utility class to interpret URL query parameters as a time range. Some
examples of supported expressions include:
- 12m
- 12 minutes into the available history.
- -4h
- 4 hours before the end of the available history.
The general form is either
([+-]?)([0-9]+)([mhd])
.
The implied fromTime is the start of the available history. The implied
toTime is the end of the available history. The implied units are
TimeUnit.MINUTES
.
Some query examples are:
- fromTime=-10m&period=Minutes
- The last 10 minutes of the available history.
- toTime=+4h
- The first 4 hours of the available history, with one sample every
minute.
- toTime=+4h&period=Hours
- The first 4 hours of the available history, with one sample every hour.
- fromTime=+2h&toTime=+4h
- The data from the 2nd hour up to (but not including) the 4th hour of the
available history, with one sample every minute.