Skip to content

Latest commit

 

History

History
73 lines (44 loc) · 2.06 KB

loops.md

File metadata and controls

73 lines (44 loc) · 2.06 KB

H4P Logo

H4P_EmitLoopCount

Shortname evtq

Emits H4PE_LOOPS once per second. This gives a very rough estimate of the number of times per second that H4 is able to schedule its task queue.

In an unloaded ESP8266 clocked at 80MHz with an empty queue, this figure is typically ~75000. This allows a (very) rough comparison with how "busy" the current app is, and can be helpful in tracking down bugs, performance bottlenecks etc. Do not treat its absolute value nor meaning as particulalry scientific.

N.B. This may require editing of H4 configuration, because providing this facility is in itself a performance "hit" and is therfore usually "compiled out".

For information on how to use this plugin, see 💎Everything is an event: Listeners, Emitters and Handlers


Contents


Usage

H4P_EmitLoopCount lpsCounter();

This plugin is a "singleton" - there may be only one single instance of it in the app. It may be instantiated as any name the user chooses, prefix all API calls below with than name.

Dependencies

H4P_EmitTick

Commands Added

N/A

Service Commands

stop / start have no effect

Callback functions

N/A


API

Constructor

H4P_EmitLoopCount();

Example Sketch


(c) 2021 Phil Bowles [email protected]