Simplified distributed block storage with strong consistency, like in Ceph
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
368 B

  1. #pragma once
  2. #include "ringloop.h"
  3. class timerfd_interval
  4. {
  5. int wait_state;
  6. int timerfd, timerfd_index;
  7. int status;
  8. ring_loop_t *ringloop;
  9. ring_consumer_t consumer;
  10. std::function<void(void)> callback;
  11. public:
  12. timerfd_interval(ring_loop_t *ringloop, int seconds, std::function<void(void)> cb);
  13. ~timerfd_interval();
  14. void loop();
  15. };