mbedtls: Use LowPowerTimer/Timer for timing
Previously we used `gettimeofday()` for Mbed TLS timing, but its
implementation provided by Mbed OS is only precise to seconds. The
microsecond component of the output `struct timeval` is always set
to zero. But Mbed TLS requires millisecond precision.

To provide required timing precision, switch to use `LowPowerTicker`
or (microsecond) `Ticker`. `LowPowerTicker` is preferred as it saves
power and Mbed TLS does not require microsecond precision.
ls
1 parent 2a73d44 commit f96f98e60e062535baaaa20ffc4735bbb43a27b4
@Lingkai Dong Lingkai Dong authored on 11 Jun 2021
Showing 2 changed files
View
connectivity/mbedtls/platform/inc/timing_alt.h
View
connectivity/mbedtls/platform/src/timing_mbed.cpp