interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / core / cortex / tests / json / t_time.om

38 lines · 640 bytes Raw Blame History
1note tests/json/t_time.om - differential harness for num_rfc (chrono to_rfc3339) and num_uuidf (uuid v4
2note text from 16 bytes). Input: u32 n, n x i64 LE nanoseconds, n x 16 bytes. Needs t_io.om.
3fn main to int
4num_init
5if not t_need 4
6ret 2
7end
8n = t_u32
9for i ulong n
10if not t_need 8
11ret 3
12end
13v = ulong 0
14p = get tibp 0
15for k ulong 8
16v = or v shl ulong get tib add p k mul k 8
17end
18put tibp 0 add p 8
19put jobl 0 0
20num_rfc bitcast long v true
21t_emitjob
22end
23for i ulong n
24if not t_need 16
25ret 4
26end
27p = get tibp 0
28for k ulong 16
29put jur k get tib add p k
30end
31put tibp 0 add p 16
32put jobl 0 0
33num_uuidf true
34t_emitjob
35end
36t_flush
37ret 0
38end