Timeout methods?

Hey all- has anyone had any success with timeout methods? I have a method sending data to the cloud every couple minutes on a timer. It works fine 99% of the time, but sometimes it will hang and cease reporting entirely until a restart SMS trigger is sent.

Any ideas how to implement a sort of timeout check, for if it has taken more than say, 10 seconds to send the message to the cloud, restart the device?

My current method (that doesn’t work) involves checking the length of time it takes to send the message to the cloud and restarting if it’s over a certain time value. However, this doesn’t work if it gets hung up on the report itself.

More of an arduino-related question, but figured I’d post here.

Ight if anyone comes across this I sorted it out more or less… there’s a SimpleTimer library example that has code for a watchdog timer.
Seems to be working as of now.
I just have it linked to a NVIC_SystemReset()
call if it runs over the timeout threshold.
(Arduino Playground - SimpleTimer Library)

Have you looked into our built-in alarm functions? https://hologram.io/docs/reference/dash/api/#clock