src/sys.bend

bend-kube-runtime@0.2.0.0 · 17 lines · 2 definitions

1import Base
2
3# Sys
4# ===
5#
6# Effects Base lacks (effs/sys.c): the wall clock, and termination signals.
7
8# The wall clock: (days since 1970-01-01, (second of the day,
9# microseconds)). time.bend's Wall.of makes it a Wall.
10def Sys.wall() -> IO(U32 & (U32 & U32)):
11  import "./effs/sys.c"
12  import "./effs/sys.js"
13
14# Waits for SIGTERM or SIGINT; answers the signal's number.
15def Sys.signal() -> IO(U32):
16  import "./effs/sys.c"
17  import "./effs/sys.js"