@web-font-path: "roboto-debian.css";
v2.2.0 (RP2040)
Loading...
Searching...
No Matches
async_work_on_timeout Struct Reference
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.
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_at_time_worker_at
  async_context_add_at_time_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