MCPcopy Create free account
hub / github.com/SmingHub/Sming / timedRead

Method timedRead

Sming/Wiring/Stream.cpp:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28#define NO_SKIP_CHAR 1 // a magic char not found in a valid ASCII numeric field
29
30int Stream::timedRead()
31{
32 OneShotFastMs timer(receiveTimeout);
33
34 int c;
35 while((c = read()) < 0 && !timer.expired()) {
36 }
37
38 return c;
39}
40
41int Stream::timedPeek()
42{

Callers

nothing calls this directly

Calls 2

readFunction · 0.85
expiredMethod · 0.45

Tested by

no test coverage detected