All Projects → rklabs → asynctimerqueue

rklabs / asynctimerqueue

Licence: GPL-3.0 license
Asynchronous timer queue mechanism(C++11)

Programming Languages

C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to asynctimerqueue

libmcu
A toolkit for firmware development
Stars: ✭ 33 (+57.14%)
Mutual labels:  queue, timer
Appserver
A multithreaded application server for PHP, written in PHP.
Stars: ✭ 930 (+4328.57%)
Mutual labels:  queue, timer
Sc
Common libraries and data structures for C.
Stars: ✭ 161 (+666.67%)
Mutual labels:  queue, timer
public
BitDust project source codes : official Public Git repository (mirror on GitHub) : https://bitdust.io
Stars: ✭ 19 (-9.52%)
Mutual labels:  asynchronous-programming
croner
Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.
Stars: ✭ 169 (+704.76%)
Mutual labels:  timer
Figma-Timer
No description or website provided.
Stars: ✭ 13 (-38.1%)
Mutual labels:  timer
aioudp
Asyncio UDP server
Stars: ✭ 21 (+0%)
Mutual labels:  asynchronous-programming
ES-Timer
A USB timer powered by Digispark ATtiny85 according to 🍅 pomodoro time management technique
Stars: ✭ 45 (+114.29%)
Mutual labels:  timer
gobroker
golang wrapper for all (to-be) kinds of message brokers
Stars: ✭ 15 (-28.57%)
Mutual labels:  queue
SAMD TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an SAMD-based board. These SAMD Hardware Timers, using Interrupt, still work even if other functions are blocking. Moreover, they are much more precise (certainly depending on clock frequency accuracy) than other software timers using millis() or micros(). That's mandatory if you …
Stars: ✭ 28 (+33.33%)
Mutual labels:  timer
TimerInterrupt
This library enables you to use Interrupt from Hardware Timers on an Arduino, such as Nano, UNO, Mega, etc. It now supports 16 ISR-based timers, while consuming only 1 hardware Timer. Timers' interval is very long (ulong millisecs). The most important feature is they're ISR-based timers. Therefore, their executions are not blocked by bad-behavin…
Stars: ✭ 76 (+261.9%)
Mutual labels:  timer
ctl
My variant of the C Template Library
Stars: ✭ 105 (+400%)
Mutual labels:  queue
orange
基于beanstalkd实现多进程处理消息队列的框架
Stars: ✭ 19 (-9.52%)
Mutual labels:  queue
plf nanotimer
A simple C++ 03/11/etc timer class for ~microsecond-precision cross-platform benchmarking. The implementation is as limited and as simple as possible to create the lowest amount of overhead.
Stars: ✭ 108 (+414.29%)
Mutual labels:  timer
js-symbol-tree
Turn any collection of objects into its own efficient tree or linked list using Symbol
Stars: ✭ 86 (+309.52%)
Mutual labels:  queue
jducers
A js transducers-like implementation using ES9
Stars: ✭ 25 (+19.05%)
Mutual labels:  asynchronous-programming
gostalkd
sjis.me
Stars: ✭ 18 (-14.29%)
Mutual labels:  queue
jobs
RoadRunner: Background PHP workers, Queue brokers
Stars: ✭ 59 (+180.95%)
Mutual labels:  queue
contech
The Contech analysis framework provides the means for generating and analyzing task graphs that enable computer architects and programmers to gain a deeper understanding of parallel programs.
Stars: ✭ 43 (+104.76%)
Mutual labels:  pthreads
linked-blocking-multi-queue
A concurrent collection that extends the existing Java concurrent collection library, offering an optionally-bounded blocking "multi-queue" based on linked nodes.
Stars: ✭ 41 (+95.24%)
Mutual labels:  queue

AsyncTimer

Asynchronous timer queue mechanism(C++11)

Build Status

This is an implementation of asynchronous timer queue. Callbacks can be registered to be run in future. Time has to be specified in millisec. An "event" can be created to run once or repeatedly. AsyncTimerQueue class has been implemented as singleton. The application intending to use AsyncTimerQueue must run Timer::AsyncTimerQueue::timerLoop in a separate thread. Below is simple example.

Event handler signature should be as follows 'void func(type1 arg1, type2, arg2, ...)'

#include "asynctimerqueue.hh"
...
...

class foo {
 public:
    void handler3() {
        std::cout << "handler3" << std::endl;
    }
};

int main() {

    std::thread asyncthread(&Timer::AsyncTimerQueue::timerLoop,
                            &Timer::AsyncTimerQueue::Instance());

    foo f;

    int eventId1 = Timer::AsyncTimerQueue::Instance().create(1000, true, &handler1);
    int eventId2 = Timer::AsyncTimerQueue::Instance().create(2000, true, &handler2);
    int eventId3 = Timer::AsyncTimerQueue::Instance().create(4000, true, &foo::handler3, &f);

    std::this_thread::sleep_for(std::chrono::seconds(2));

    Timer::AsyncTimerQueue::Instance().cancel(eventId1);

    asyncthread.join();
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].