Mistake on this page?
Report an issue in GitHub or email us


LowPowerTimer class hierarchy

LowPowerTimer inherits from the Timer Class. The timer in this case continues operating even in deep sleep mode. It relies on lp_ticker, which is the low power ticker.

You can use the LowPowerTimer interface to create, start, stop and read a timer for measuring small times (between microseconds and seconds). You can independently create, start and stop any number of LowPowerTimer objects. For more information about power management, please see our power management APIs.

LowPowerTimer class reference

LowPowerTimer example

 * Copyright (c) 2020 Arm Limited and affiliates.
 * SPDX-License-Identifier: Apache-2.0

#include "mbed.h"

using namespace std::chrono;

LowPowerTimer t;

int main()
    printf("Hello World!\n");
    printf("The time taken was %llu milliseconds\n", duration_cast<milliseconds>(t.elapsed_time()).count());

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.