2020-10-01 14:55:03 -07:00
|
|
|
/**
|
|
|
|
* @file scheduler.h
|
|
|
|
*
|
|
|
|
* @date October 1, 2020
|
|
|
|
*/
|
2021-08-03 19:05:01 -07:00
|
|
|
#include "pch.h"
|
|
|
|
|
2020-10-01 14:55:03 -07:00
|
|
|
#include "scheduler.h"
|
|
|
|
|
|
|
|
void action_s::execute() {
|
2024-01-05 14:53:54 -08:00
|
|
|
efiAssertVoid(ObdCode::CUSTOM_ERR_ASSERT, m_callback != NULL, "callback==null1");
|
|
|
|
m_callback(m_param);
|
2020-10-01 14:55:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
schfunc_t action_s::getCallback() const {
|
2024-01-05 14:53:54 -08:00
|
|
|
return m_callback;
|
2020-10-01 14:55:03 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void * action_s::getArgument() const {
|
2024-01-05 14:53:54 -08:00
|
|
|
return m_param;
|
2020-10-01 14:55:03 -07:00
|
|
|
}
|
2024-05-02 18:22:02 -07:00
|
|
|
|
|
|
|
#if EFI_UNIT_TEST
|
2024-05-03 03:09:48 -07:00
|
|
|
efitick_t scheduling_s::getMomentUs() const {
|
2024-05-03 07:53:22 -07:00
|
|
|
return NT2US(momentNt);
|
2024-05-02 18:22:02 -07:00
|
|
|
}
|
|
|
|
#endif
|