Description
For each interval, use its left sample and count its duration only when strictly above or below threshold.
A time-window check needs explicit endpoints, inclusion rules and a common clock. Caller-supplied holding limits and temperature flags are model inputs; passing a local check does not establish a safe handling process.
For each interval, use its left sample and count its duration only when strictly above or below threshold.
When to use this tool
Use Cold Chain Excursion Supplied Threshold Duration when you need an explicit holding-window, clock or sampled-duration calculation.
How to use the tool and how it works
- Enter times, temperatures, threshold, above. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read duration, intervalCount. Use the output convention below.
Require aligned temperatures and strictly increasing times with at least two samples. For each interval, use its left sample and count its duration only when strictly above or below threshold.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| times | Strictly increasing numeric time coordinates. | Required. Array of finite number; maximum items 256. |
| temperatures | Left-held sample values; the final value has no following interval. | Required. Array of finite number; maximum items 256. |
| threshold | Threshold | Required. Finite number. |
| above | Above | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| duration | Duration | Required. Finite number. |
| intervalCount | Interval Count | Required. Safe integer. |
{
"input": {
"times": [
0,
10,
30,
40
],
"temperatures": [
3,
8,
9,
2
],
"threshold": 5,
"above": true
},
"output": {
"duration": 30,
"intervalCount": 2
}
} Limitations and assumptions
- The final temperature has no following interval and contributes no duration. This is left-held data, without interpolation, safe limits, dose/lethality modeling or a food-safety verdict.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the applicable validated food-safety procedure and complete temperature/time history. Resolve sensor calibration, sampling gaps and product-specific limits before making handling decisions.
References
Similar or alternative tools
- Sample Temperature Duration Window
Return time overlap and an independent inclusive temperature-in-range flag.
- Temperature Sample Valid Duration
Sum valid durations and all recorded durations separately.