class
TermBuf::Meter
- TermBuf::Meter
- IO
- Reference
- Object
Overview
Counts the bytes going to the terminal on their way past.
Wrapping rather than buffering keeps the write path one pass: the encoder still writes straight through to the device, and the count is a single addition per write.
Defined in:
termbuf/terminal/meter.crConstructors
Instance Method Summary
-
#bytes : Int32
Bytes since this was last set to zero.
-
#bytes=(bytes : Int32)
Bytes since this was last set to zero.
-
#flush : Nil
Flushes the stream underneath.
-
#read(slice : Bytes) : Int32
Always raises.
-
#write(slice : Bytes) : Nil
Counts slice and passes it on.