mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Embed: (wiki syntax)

« Back to documentation index

LowPowerTimer Class Reference

Low power timer. More...

#include <LowPowerTimer.h>

Inherits mbed::Timer, NonCopyable< LowPowerTimer >, mbed::Timer, and NonCopyable< LowPowerTimer >.

Public Member Functions

void start ()
 Start the timer.
void start ()
 Start the timer.
void stop ()
 Stop the timer.
void stop ()
 Stop the timer.
void reset ()
 Reset the timer to 0.
void reset ()
 Reset the timer to 0.
float read ()
 Get the time passed in seconds.
float read ()
 Get the time passed in seconds.
int read_ms ()
 Get the time passed in milliseconds.
int read_ms ()
 Get the time passed in milliseconds.
int read_us ()
 Get the time passed in microseconds.
int read_us ()
 Get the time passed in microseconds.
 operator float ()
 An operator shorthand for read()
 operator float ()
 An operator shorthand for read()
us_timestamp_t read_high_resolution_us ()
 Get in a high resolution type the time passed in microseconds.
us_timestamp_t read_high_resolution_us ()
 Get in a high resolution type the time passed in microseconds.

Protected Member Functions

 MBED_DEPRECATED ("Invalid copy construction of a NonCopyable resource.") NonCopyable(const NonCopyable &)
 NonCopyable copy constructor.
 MBED_DEPRECATED ("Invalid copy assignment of a NonCopyable resource.") NonCopyable &operator
 NonCopyable copy assignment operator.

Private Member Functions

 MBED_DEPRECATED ("Invalid copy construction of a NonCopyable resource.") NonCopyable(const NonCopyable &)
 NonCopyable copy constructor.
 MBED_DEPRECATED ("Invalid copy assignment of a NonCopyable resource.") NonCopyable &operator
 NonCopyable copy assignment operator.

Detailed Description

Low power timer.

Note:
Synchronization level: Interrupt safe

Definition at line 36 of file cmsis/BUILD/mbed/drivers/LowPowerTimer.h.


Member Function Documentation

MBED_DEPRECATED ( "Invalid copy construction of a NonCopyable< Timer > resource."   ) const [protected, inherited]

NonCopyable copy constructor.

A compile time warning is issued when this function is used, and a runtime warning is printed when the copy construction of the noncopyable happens.

If you see this warning, your code is probably doing something unspecified. Copying of noncopyable resources can lead to resource leak and random error.

Definition at line 190 of file cmsis/BUILD/mbed/platform/NonCopyable.h.

MBED_DEPRECATED ( "Invalid copy assignment of a NonCopyable< Timer > resource."   ) [protected, inherited]

NonCopyable copy assignment operator.

A compile time warning is issued when this function is used, and a runtime warning is printed when the copy construction of the noncopyable happens.

If you see this warning, your code is probably doing something unspecified. Copying of noncopyable resources can lead to resource leak and random error.

operator float (  ) [inherited]

An operator shorthand for read()

Definition at line 118 of file Timer.cpp.

operator float (  ) [inherited]

An operator shorthand for read()

float read (  ) [inherited]

Get the time passed in seconds.

Returns:
Time passed in seconds
float read ( void   ) [inherited]

Get the time passed in seconds.

Returns:
Time passed in seconds

Definition at line 81 of file Timer.cpp.

us_timestamp_t read_high_resolution_us (  ) [inherited]

Get in a high resolution type the time passed in microseconds.

Returns a 64 bit integer.

us_timestamp_t read_high_resolution_us (  ) [inherited]

Get in a high resolution type the time passed in microseconds.

Returns a 64 bit integer.

Definition at line 91 of file Timer.cpp.

int read_ms (  ) [inherited]

Get the time passed in milliseconds.

Returns:
Time passed in milliseconds

Definition at line 86 of file Timer.cpp.

int read_ms (  ) [inherited]

Get the time passed in milliseconds.

Returns:
Time passed in milliseconds
int read_us (  ) [inherited]

Get the time passed in microseconds.

Returns:
Time passed in microseconds

Definition at line 76 of file Timer.cpp.

int read_us (  ) [inherited]

Get the time passed in microseconds.

Returns:
Time passed in microseconds
void reset (  ) [inherited]

Reset the timer to 0.

If it was already running, it will continue

Definition at line 110 of file Timer.cpp.

void reset (  ) [inherited]

Reset the timer to 0.

If it was already running, it will continue

void start (  ) [inherited]

Start the timer.

void start ( void   ) [inherited]

Start the timer.

Definition at line 50 of file Timer.cpp.

void stop (  ) [inherited]

Stop the timer.

void stop ( void   ) [inherited]

Stop the timer.

Definition at line 63 of file Timer.cpp.