MCPcopy Create free account
hub / github.com/attermann/microReticulum / testsleep

Function testsleep

test/test_general/test_general.cpp:24–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23#ifdef ARDUINO
24void testsleep(float seconds) { delay((uint32_t)(seconds * 1000)); }
25#else
26void testsleep(float seconds) { timespec time; time.tv_sec = (time_t)(seconds); time.tv_nsec = (seconds - (float)time.tv_sec) * 1000000000; ::nanosleep(&time, nullptr); }
27#endif

Callers 1

testTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected