forked from rusefi/rusefi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglobal_execution_queue.h
More file actions
32 lines (26 loc) · 910 Bytes
/
global_execution_queue.h
File metadata and controls
32 lines (26 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* @file global_execution_queue.h
*
* Created on: Jan 9, 2019
* @author Andrey Belomutskiy, (c) 2012-2020
*/
#pragma once
#include "scheduler.h"
#include "event_queue.h"
class TestExecutor : public ExecutorInterface {
public:
~TestExecutor();
void scheduleByTimestamp(const char *msg, scheduling_s *scheduling, efitimeus_t timeUs, action_s action) override;
void scheduleByTimestampNt(const char *msg, scheduling_s *scheduling, efitick_t timeNt, action_s action) override;
void scheduleForLater(const char *msg, scheduling_s *scheduling, int delayUs, action_s action) override;
void cancel(scheduling_s* scheduling) override;
void clear();
int executeAll(efitick_t now);
int size();
scheduling_s * getHead();
scheduling_s * getForUnitTest(int index);
void setMockExecutor(ExecutorInterface* exec);
private:
EventQueue schedulingQueue;
ExecutorInterface* m_mockExecutor = nullptr;
};