nx_asset_prov_clock_gate_t346.nx source
↩ module page · 13 lines · 572 B
1import "nx_asset_prov_clock_candidate_t346.nx"
2func main()->i64 {
3 let before:i64=sys_now_realtime_sec()
4 let actual:i64=pv_now()
5 let after:i64=sys_now_realtime_sec()
6 let legacy:i64=__syscall(PV_SYS_TIME,0,0,0,0,0,0)
7 pv_puts("PROVENANCE-CLOCK before=");pv_putn(before);pv_puts(" actual=");pv_putn(actual);pv_puts(" after=");pv_putn(after);pv_puts(" legacy_raw=");pv_putn(legacy);pv_puts("\n")
8 if before<=0{return 1}
9 if actual<before{return 2}
10 if actual>after{return 3}
11 pv_puts("PROVENANCE-CLOCK 3/3 PASS: positive epoch bracketed by native realtime\n")
12 return 0
13}