This is the Linux app named Arduino Timer Library RZtimer whose latest release can be downloaded as RZtimer.zip. It can be run online in the free hosting provider OnWorks for workstations.
Download and run online this app named Arduino Timer Library RZtimer with OnWorks for free.
Follow these instructions in order to run this app:
- 1. Downloaded this application in your PC.
- 2. Enter in our file manager https://www.onworks.net/myfiles.php?username=XXXXX with the username that you want.
- 3. Upload this application in such filemanager.
- 4. Start the OnWorks Linux online or Windows online emulator or MACOS online emulator from this website.
- 5. From the OnWorks Linux OS you have just started, goto our file manager https://www.onworks.net/myfiles.php?username=XXXXX with the username that you want.
- 6. Download the application, install it and run it.
SCREENSHOTS
Ad
Arduino Timer Library RZtimer
DESCRIPTION
Usage:
- run function blinkLED() every 2000 ms:
timer.addEverytime(2000, blinkLED);
- run function itWorks() two times with interval 2000 ms, wait 300 ms before first start:
timer.addTask(2000, 2, 300, itWorks);
Removing a task:
removeEverytime(callback_function);
removeTask(callback_function);
Library can also be used in desktop C++ applications:
#include <iostream>
#include <string>
#include <chrono>
#include <thread>
#include "RZtimer.h"
int main()
{
RZTimer timer;
timer.addEverytime(2000, [] (){ std::cout << "Hello! " << std::chrono::duration_cast<std::chrono::milliseconds >(
std::chrono::system_clock::now().time_since_epoch()
).count() << "\n";});
while(1){
timer.run();
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
Programming Language
C++
This is an application that can also be fetched from https://sourceforge.net/projects/arduino-timer-library-rztimer/. It has been hosted in OnWorks in order to be run online in an easiest way from one of our free Operative Systems.