How do I "suspend" a cog - or is it worth it.
bdickens
Posts: 110
I have a situation where a cog is running ping. But about 50% of the time, I don't need it. So I was considering adding a method and suspending the cog until it is needed again. Looking at the posts, there doesn't seem consensus that it's even worth doing. Doesn't seem to draw much additional power and the code overhead might make it pretty pointless.
So is there an efficient way to suspend a cog (without a stop/start) ? Is the savings in power significant ?
Thanks
So is there an efficient way to suspend a cog (without a stop/start) ? Is the savings in power significant ?
Thanks
Comments
Haven't tested it, so let me know your milage
This sounds like something that can be placed in in-line code.· What I mean is that a dedicated cog may not be necessary if·can be shared within one cog that also·performs other·tasks.· This situation usually lends itself to the main·"parent cog", but certainly is not confined to that position.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
WWW.HAPB.NET
"Don't ask yourself what the world needs - ask yourself what makes you come alive, and then go do it." - H.T.Whitman