v2.0.0
Data Fields
async_work_on_timeout Struct Reference
High Level APIs » pico_async_context

A "timeout" instance used by an async_context. More...

`#include <async_context.h>`

Collaboration diagram for async_work_on_timeout:
[legend]

## Data Fields
struct async_work_on_timeout * | next
| private link list pointer
void(* | do_work )(async_context_t *context, struct async_work_on_timeout *timeout)
| Method called when the timeout is reached; may not be NULL. More...
absolute_time_t | next_time
| The next timeout time; this should only be modified during the above methods or via async_context methods.
void * | user_data
| User data associated with the timeout instance.

## Detailed Description

A "timeout" instance used by an async_context.

A "timeout" represents some future action that must be taken at a specific time. Its methods are called from the async_context under lock at the given time

See also
  async_context_add_worker_at
  async_context_add_worker_in_ms

## Field Documentation

## ◆ do_work

void(* async_work_on_timeout::do_work) (async_context_t *context, struct async_work_on_timeout *timeout)

Method called when the timeout is reached; may not be NULL.

Note, that when this method is called, the timeout has been removed from the async_context, so if you want the timeout to repeat, you should re-add it during this callback

Parameters

  context |
  timeout |

The documentation for this struct was generated from the following file:

- include/pico/async_context.h