Description
Subtract sampleTime from evaluationTime for age and divide by positive freshnessWindow for fraction.
A timestamp difference produces an age or lag only after both timestamps use one origin and unit. Negative differences can be meaningful diagnostics of future samples or early events.
Subtract sampleTime from evaluationTime for age and divide by positive freshnessWindow for fraction.
When to use this tool
Use Gauge Sample Age Fraction when you need a supplied sample-age or event-lag calculation.
How to use the tool and how it works
- Enter sampleTime, evaluationTime, freshnessWindow. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read age, fraction, futureSample. Inspect futureSample before interpreting the associated values.
Subtract sampleTime from evaluationTime for age and divide by positive freshnessWindow for fraction. Mark futureSample when age is negative.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| sampleTime | Sample Time | Required. Finite number. |
| evaluationTime | Evaluation Time | Required. Finite number. |
| freshnessWindow | Freshness Window | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| age | Age | Required. Finite number. |
| fraction | Dimensionless fraction under the stated convention. | Required. Finite number. |
| futureSample | Future Sample | Required. Boolean. |
{
"input": {
"sampleTime": 90,
"evaluationTime": 100,
"freshnessWindow": 20
},
"output": {
"age": 10,
"fraction": 0.5,
"futureSample": false
}
} Limitations and assumptions
- This returns a signed age ratio without clamping or deciding a freshness policy; all time values require compatible units.
- 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
Resolve clock synchronization, timezone conversion, and source timestamp accuracy before interpreting real-world timing.
References
Similar or alternative tools
- News Update Reference Time Gap
Return referenceAt minus each timestamp and correctedAt minus publishedAt.
- Caption Lead Lag Scalar
Subtract suppliedCaptionClockOffset from captionOnset, then subtract speechOnset for lag.