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

Method read

Sming/Arch/Host/Components/driver/hw_timer.cpp:102–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 uint32_t read()
103 {
104 auto elapsed = now() - start_time;
105 if(elapsed >= interval) {
106 return 0;
107 } else {
108 return (interval - elapsed) * base_ticks_per_us::num / divisor;
109 }
110 }
111
112protected:
113 void* thread_routine() override;

Callers 4

hw_timer1_readFunction · 0.45
write_chunkFunction · 0.45
read_chunkFunction · 0.45
readFlashFileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected