init the timer before we try to use it (#3205)

* init the timer before we try to use it

* format

* guard
This commit is contained in:
Matthew Kennedy 2021-08-27 00:59:00 -07:00 committed by GitHub
parent 0b3ef5f553
commit 98a98e920d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -35,8 +35,12 @@ public:
/**
* This invokes PeriodicTask() immediately and starts the cycle of invocations and sleeps
*/
virtual void Start() {
runAndScheduleNext(this);
}
virtual void Start() {
#if !EFI_UNIT_TEST
chVTObjectInit(&timer);
#endif // EFI_UNIT_TEST
runAndScheduleNext(this);
}
};