src/vmm/loggate.bend checks
raw source on the hub · import 0xbf40d3526dc09381022cc668b5b4f316/src/vmm/loggate.bend as Loggate
2 imports
import Base import ../lib/u64.bend as U
Types
type Gate source · line 10 · raw
Data
Gate@tokens:U32 -> @last:0xbf40d3526dc09381022cc668b5b4f316/src/lib/u64.U64 -> @dropped:U32 -> Gate
type GateOut source · line 13 · raw
Data
GateOut@gate:Gate -> @verdict:U32 -> GateOut
Definitions
def Gate.full source · line 16 · raw
U32
def Gate.refill source · line 21 · raw
@+tokens:U32 -> @+last:0xbf40d3526dc09381022cc668b5b4f316/src/lib/u64.U64 -> @+now:0xbf40d3526dc09381022cc668b5b4f316/src/lib/u64.U64 -> U32
The bucket at now (ms), from the gate's last time: 20 thousandths a ms, at most full (10 s of refill is all it takes).
def Gate.step source · line 29 · raw
@g:Gate -> @+now:0xbf40d3526dc09381022cc668b5b4f316/src/lib/u64.U64 -> GateOut
A message at now: dropped (verdict 0, one more counted) when the bucket holds less than one; else it passes, taking one, with verdict 1 + the messages dropped since the last that passed.
def Gate.wire source · line 36 · raw
@+ws:List<&2, U32> -> Gate
def Gate.now source · line 39 · raw
@+ws:List<&2, U32> -> 0xbf40d3526dc09381022cc668b5b4f316/src/lib/u64.U64