Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-client by
M2MTimer Class Reference
#include <m2mtimer.h>
| Public Member Functions | |
| M2MTimer (M2MTimerObserver &observer) | |
| Constructor. | |
| virtual | ~M2MTimer () | 
| Destructor. | |
| void | start_timer (uint64_t interval, M2MTimerObserver::Type type, bool single_shot=true) | 
| Starts the timer. | |
| void | start_dtls_timer (uint64_t intermediate_interval, uint64_t total_interval, M2MTimerObserver::Type type=M2MTimerObserver::Dtls) | 
| Starts the timer in DTLS manner. | |
| void | stop_timer () | 
| Stops the timer. | |
| bool | is_intermediate_interval_passed () | 
| Checks if the intermediate interval has passed. | |
| bool | is_total_interval_passed () | 
| Checks if the total interval has passed. | |
Detailed Description
Timer class for mbed client.
Definition at line 28 of file m2mtimer.h.
Constructor & Destructor Documentation
| M2MTimer | ( | M2MTimerObserver & | observer ) | 
Constructor.
| virtual ~M2MTimer | ( | ) |  [virtual] | 
Destructor.
Member Function Documentation
| bool is_intermediate_interval_passed | ( | ) | 
Checks if the intermediate interval has passed.
- Returns:
- True if the interval has passed, else false.
| bool is_total_interval_passed | ( | ) | 
Checks if the total interval has passed.
- Returns:
- True if the interval has passed, else false.
| void start_dtls_timer | ( | uint64_t | intermediate_interval, | 
| uint64_t | total_interval, | ||
| M2MTimerObserver::Type | type = M2MTimerObserver::Dtls | ||
| ) | 
Starts the timer in DTLS manner.
- Parameters:
- 
  intermediate_interval The intermediate interval to use, must be smaller than total (usually 1/4 of total). total_interval The total interval to use; This is the timeout value of a DTLS packet. type The type of the timer. 
| void start_timer | ( | uint64_t | interval, | 
| M2MTimerObserver::Type | type, | ||
| bool | single_shot = true | ||
| ) | 
Starts the timer.
- Parameters:
- 
  interval The timer interval in milliseconds. single_shot Defines whether the timer is ticked once or restarted every time at expiry. 
| void stop_timer | ( | ) | 
Stops the timer.
This cancels the ongoing timer.
Generated on Tue Jul 12 2022 18:07:00 by
 1.7.2
 1.7.2 
    