code wiki / _hdl_build / nx_crawl_pace_gate.nx
nx_crawl_pace_gate.nx
buildroot/runtime/_hdl_build/nx_crawl_pace_gate.nx
about
nx_crawl_pace_gate.nx -- deterministic gate for the pacing POLICY (no network): honor-Retry-After,
exponential backoff, reset-on-success, crawl-delay override, wait clamp, Retry-After parse, persistence.
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_crawl_pace.nxnx_gate_verdict.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const R13_BACKOFF_S: i64 = PACE_MAX_BACKOFF_MS / PACE_BASE_MS // 300 s = the LONGEST backoff the |
| 12 | const R13_POLITE_CD_MS: i64 = PACE_WAIT_CAP_MS // the polite fixture's published |
| 25 | const R13_LONG_WAIT_MS: i64 = PACE_WAIT_CAP_MS * 2 // pushed into next_allowed BY HAND so |
| 28 | const R13_DIRTY_BYTE: i64 = 0xff // all-ones fill for the reused-buffer |
functions
| 32 | func gw(s: *u8) -> i64 { var k: i64=0; while s[k]!=(0 as u8){k=k+1} sys_write(1,s,k); return 0 } |
| 33 | func gn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var q: i64=k-1; var x: i64=0; while q>=0 { o[x]=t[q]; x=x+1; q=q-1 } sys_write(1,o,x); return 0 } |
| 34 | func chk(name: *u8, got: i64, want: i64, p: *i64, t: *i64) -> i64 |
| 41 | func main() -> i64 |