Network Timeout

Overview

The k_delayed_work API has a 1 ms accuracy for a timeout value, so the maximum timeout can be about 24 days. Some network timeouts are longer than this, so the net_timeout API provides a generic timeout mechanism that tracks such wraparounds and restarts the timeout as needed.

API Reference

group net_timeout

Network long timeout primitives and helpers.

Defines

NET_TIMEOUT_MAX_VALUE

Let the max timeout be 100 ms lower because of possible rounding in delayed work implementation.

struct net_timeout
#include <net_timeout.h>

Generic struct for handling network timeouts