Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Concurrency with Modern C++

You're reading from   Concurrency with Modern C++ What every professional C++ programmer should know about concurrency.

Arrow left icon
Product type Paperback
Published in Dec 2019
Publisher
ISBN-13 9781839211027
Length 543 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rainer Grimm Rainer Grimm
Author Profile Icon Rainer Grimm
Rainer Grimm
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

1. Reader Testimonials FREE CHAPTER
2. Introduction 3. Concurrency with Modern C++ 4. Memory Model 5. Multithreading 6. Parallel Algorithms of the Standard Template Library 7. The Near Future: C++20 8. Case Studies 9. The Future: C++23 10. Patterns and Best Practices 11. Synchronisation Patterns 12. Concurrent Architecture 13. Best Practices 14. Lock-Based Data Structures 15. Challenges 16. The Time Library 17. CppMem - An Overview 18. Glossary 19. Index

The Interplay of Time Point, Time Duration, and Clock

Time point
The time point is given by its starting point - the so-called epoch - and the time that has elapsed since the epoch (expressed as a time duration).”
Time duration
The time duration is the difference between two time points. It is measured in the number of time ticks.
Clock
The clock consists of a starting point and a time tick. This information enables you to calculate the current time.

You can compare time points. When you add a time duration to a time point, you get a new time point. The time tick is the accuracy of the clock in which you measure the time duration. The birth of Jesus is in my culture the starting time point and a year is a typical time tick.

I illustrate the three concepts using the lifetime of Dennis Ritchie. The creator of C who died in 2011. For the sake of simplicity, I’m only interested in the years.

Here is the lifetime.

The lifetime of Dennis Ritchie
The lifetime of Dennis Ritchie...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime