we allow using of schedulig_s::getMomentUs schedulig_s::getMomentRaw only in unit tests

This commit is contained in:
kifir 2024-05-03 13:09:48 +03:00
parent 291dadedd1
commit c6f8aaf668
2 changed files with 6 additions and 4 deletions

View File

@ -21,7 +21,7 @@ void * action_s::getArgument() const {
}
#if EFI_UNIT_TEST
efitick_t scheduling_s::getMomentUs() {
efitick_t scheduling_s::getMomentUs() const {
return NT2US(momentX);
}
#endif

View File

@ -61,16 +61,18 @@ private:
*/
#pragma pack(push, 4)
struct scheduling_s {
efitick_t getMomentNt() {
efitick_t getMomentNt() const {
return momentX;
}
efitick_t getMomentUs();
#if EFI_UNIT_TEST
efitick_t getMomentUs() const;
// todo: get rid of this 'I am not sure what's the proper type' method once we are done cleaning things up in unit tests
efitick_t getMomentRaw() {
efitick_t getMomentRaw() const {
return momentX;
}
#endif
void setMomentX(efitick_t p_moment) {
momentX = p_moment;