omega-mcp
aien-dev/omega-mcp
Brought by drakestapleton
omega-mcp / data / examples / clock.om
| 1 | note monotonic and realtime clocks, a short sleep and random bytes |
| 2 | global buf uchar 16 |
| 3 | fn main to int |
| 4 | a = monons |
| 5 | r = sleepns 1000000 |
| 6 | b = monons |
| 7 | if lt sub b a 1000000 |
| 8 | ret 1 |
| 9 | end |
| 10 | if le realns 0 |
| 11 | ret 2 |
| 12 | end |
| 13 | if ne random buf 0 16 0 16 |
| 14 | ret 3 |
| 15 | end |
| 16 | ret 0 |
| 17 | end |