commit | 43aeeb6423c3ae7f9385fe1f092053498e4dd535 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Mon Jun 06 17:13:03 2022 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Jun 07 16:02:14 2022 +0000 |
tree | 42b5ebb077fd66c5ffe604ea30444b3ce4559dcf | |
parent | 595f40d1803e6ccdba95a5657857aabbc9ab1480 [diff] |
pw_chrono: Use compound literal in C, but not C++ - In the C duration macros, use a compound literal to initialize the duration struct inline. This is a C99 (not C++) feature, so do not use it if compiling as C++. - Remove digit separators from PW_CHRONO_SYSTEM_CLOCK_PERIOD_SECONDS_DENOMINATOR, since they are not supported in C. - Test the duration macros in both C and C++. Change-Id: Id3502cf539f41fec276d786750317f74b083fc89 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/97224 Reviewed-by: Ewout van Bekkum <ewout@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com> Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/