Skip to Content
Embedded Programming with Modern C++ Cookbook
book

Embedded Programming with Modern C++ Cookbook

by Igor Viarheichyk
April 2020
Intermediate to advanced
412 pages
9h 58m
English
Packt Publishing
Content preview from Embedded Programming with Modern C++ Cookbook

Working with delays

Periodic data processing is a common pattern in many embedded applications. The code does not need to work all the time. If we know in advance when processing is needed, an application or a worker thread can be inactive most of the time, waking up and processing data only when needed. It saves power consumption or lets other applications running on the device use the CPU resources when the application is idle.

There are several techniques to organize periodic processing. A worker thread that runs a loop with a delay in it is one of the simplest and most common of them.

C++ provides standard functions to add a delay to the current execution thread. In this recipe, we will learn two ways of adding a delay into an application ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C++ System Programming Cookbook

C++ System Programming Cookbook

Onorato Vaticone
C++ Cookbook

C++ Cookbook

D. Ryan Stephens, Christopher Diggins, Jonathan Turkanis, Jeff Cogswell

Publisher Resources

ISBN: 9781838821043Supplemental Content