You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
272 B

11 months ago
  1. #include "ticket.h"
  2. uint32_t Get_ticket(void) {return HAL_GetTick();}
  3. uint32_t haspassedms(uint32_t ticket){
  4. uint32_t nowticket = Get_ticket();
  5. if(nowticket > ticket)
  6. return nowticket - ticket;
  7. else
  8. return UINT32_MAX - ticket + nowticket;//��ʱʱ��
  9. }