aienos.com
Source of www.aienos.com, served from my own hardware
Brought by drakestapleton
aienos.com / om / hive-page / fresh.om
| 1 | note Scalar OSC IR v1 unit. Threshold is passed from the shared feed contract. |
| 2 | note Inputs are integer milliseconds; JS rounds fractional elapsed age upward, |
| 3 | note preserving the strict stale comparison against the integer threshold. |
| 4 | note Backwards source timestamps retain priority over an interrupted fetch. |
| 5 | fn fresh now_ms long gen_ms long prev_ms long stale_ms long fetch_ok bool to uint |
| 6 | if lt gen_ms prev_ms |
| 7 | ret uint 2 |
| 8 | end |
| 9 | if not fetch_ok |
| 10 | ret uint 3 |
| 11 | end |
| 12 | if gt now_ms gen_ms |
| 13 | if gt sub now_ms gen_ms stale_ms |
| 14 | ret uint 1 |
| 15 | end |
| 16 | end |
| 17 | ret uint 0 |
| 18 | end |