Timers
Detailed information about this class can be found in Timer
.
Chronometer
The Chronometer can be used to measure how much time has elapsed in a block of code. The following example uses a simple stopwatch.
Alarm
The Alarm can be used to get interrupts at a specific interval. The following code executes a callback every second for 10 seconds.
There are no restrictions to what can be done in an interrupt. For example, it is possible to even do network requests with an interrupt. However, it is important to keep in mind that interrupts are handled sequentially, so it’s good practice to keep them short. More information can be found in Interrupt Handling
.
Last updated