SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Раз в 10 секунд
  2. if (HAL_GetTick() - timeTask1 > 10000 || HAL_GetTick() - timeTask1 < 0) // HAL_GetTick() - timeTask1 < 0 защита от переполнения
  3. {
  4. //... тут выполняется задача 1
  5.     timeTask1 = HAL_GetTick(); // обновляем
  6. }
  7. // Раз в 50 милисекунд
  8. if (HAL_GetTick() - timeTask2 > 50 || HAL_GetTick() - timeTask2 < 0)
  9. {
  10. //... задача 2
  11.     timeTask2 = HAL_GetTick();
  12. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top