Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturKnopik committed Dec 30, 2024
1 parent 3f23308 commit 8699451
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#include "tasks.h"
#include "thread_holder_base.h"

static constexpr int32_t SCHEDULER_MINTICKS = 50;
#include <memory>

class SchedulerTask;
static constexpr int32_t SCHEDULER_MINTICKS = 50;

using SchedulerTask_ptr = std::unique_ptr<SchedulerTask>;
using SchedulerTask_ptr = std::unique_ptr<class SchedulerTask>;

class SchedulerTask : public Task
{
Expand All @@ -26,8 +26,6 @@ class SchedulerTask : public Task
private:
uint32_t eventId = 0;
uint32_t delay = 0;

friend SchedulerTask_ptr createSchedulerTask(uint32_t delay, TaskFunc&& f);
};

SchedulerTask_ptr createSchedulerTask(uint32_t delay, TaskFunc&& f);
Expand Down
4 changes: 1 addition & 3 deletions src/tasks.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ using TaskFunc = std::function<void(void)>;
const int DISPATCHER_TASK_EXPIRATION = 2000;
const auto SYSTEM_TIME_ZERO = std::chrono::system_clock::time_point(std::chrono::milliseconds(0));

class Task;

using Task_ptr = std::unique_ptr<Task>;
using Task_ptr = std::unique_ptr<class Task>;

class Task
{
Expand Down

0 comments on commit 8699451

Please sign in to comment.