| Home | Libraries | People | FAQ | More

#### test::run_for

Run an I/O context for a certain amount of time.

##### Synopsis

Defined in header `<boost/beast/_experimental/test/handler.hpp>`

    template<
        class Rep,
        class Period>
    void
    run_for(
        net::io_context& ioc,
        std::chrono::duration< Rep, Period > elapsed);

##### Description

This function runs and dispatches handlers on the specified I/O context, until one of the following conditions is true:

- The I/O context runs out of work.
- No completions occur and the specified amount of time has elapsed.

##### Parameters

Name | Description
--- | ---
`ioc` | The I/O context to run
`elapsed` | The maximum amount of time to run for.