pw_chrono: adds the SystemTimer to schedule callbacks
Adds the pw::chrono::SystemTimer facade with STL backend to
schedule callbacks at a specified time in the future.
Change-Id: I2d9f3fe52d214c1ec0ddc152d1450a414339f59e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/49342
Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
Reviewed-by: Wyatt Hepler <hepler@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_chrono_stl/docs.rst b/pw_chrono_stl/docs.rst
index 3ba23ba..b1aea39 100644
--- a/pw_chrono_stl/docs.rst
+++ b/pw_chrono_stl/docs.rst
@@ -7,15 +7,27 @@
using STL's ``std::chrono`` library.
.. warning::
- This module is under construction, not ready for use, and the documentation
- is incomplete.
+ This module is still under construction, the API is not yet stable.
SystemClock backend
-------------------
-The STL based ``system_clock`` backend implements the ``pw_chrono:system_clock``
-facade by using the ``std::chrono::steady_clock``. Note that the
-``std::chrono::system_clock`` cannot be used as this is not always a monotonic
-clock source.
+The STL based ``pw_chrono_stl:system_clock`` backend target implements the
+``pw_chrono:system_clock`` facade by using the ``std::chrono::steady_clock``.
+Note that the ``std::chrono::system_clock`` cannot be used as this is not always
+a monotonic clock source.
+
+See the documentation for ``pw_chrono`` for further details.
+
+SystemTimer backend
+-------------------
+The STL based ``pw_chrono_stl:system_timer`` backend target implements the
+``pw_chrono:system_timer`` facade by spawning a detached thread for every single
+``InvokeAt()`` and ``InvokeAfter()`` call. This thread simply sleeps until the
+desired ``expiration_deadline`` and invokes the user's ``ExpiryCallback`` if it
+wasn't cancelled.
+
+.. Warning::
+ Although fully functional, the current implementation is NOT efficient!
See the documentation for ``pw_chrono`` for further details.