Agent function() run every 10 seconds?

How do I get an Agent function to run every 10 seconds?
One way is to use agent.send() from the Imp.

But what if the Imp has lost it’s Wifi signal?
I tried imp.sleep(10) in the Agent. It compiles and runs.
This blocks all other agent.sends from the Imp.

I’m stuck please help.

Figured it out!

function every5(){
if(tsec&&(time()-tsec>32)) {
server.log(“Lost”);
tsec+=60601; //hours
}
imp.wakeup(5,every5);
}