MCPcopy Create free account
hub / github.com/Marzogh/SPIMemory / functionRunTime

Method functionRunTime

src/SPIFlash.cpp:176–182  ·  view source on GitHub ↗

Returns the time taken to run a function. Must be called immediately after a function is run as the variable returned is overwritten each time a function from this library is called. Primarily used in the diagnostics sketch included in the library to track function time. This function can only be called if #define RUNDIAGNOSTIC is uncommented in SPIFlash.h

Source from the content-addressed store, hash-verified

174//Returns the time taken to run a function. Must be called immediately after a function is run as the variable returned is overwritten each time a function from this library is called. Primarily used in the diagnostics sketch included in the library to track function time.
175//This function can only be called if #define RUNDIAGNOSTIC is uncommented in SPIFlash.h
176float SPIFlash::functionRunTime(void) {
177#ifdef RUNDIAGNOSTIC
178 return _spifuncruntime;
179#else
180 return 0;
181#endif
182}
183
184//Returns the library version as three bytes
185bool SPIFlash::libver(uint8_t *b1, uint8_t *b2, uint8_t *b3) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected