Heure.h 651 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Heure.h V1.0
  3. *
  4. * Created on: 14 mai 2019
  5. * Author: e_rcluze
  6. */
  7. #ifndef HEURE_H_
  8. #define HEURE_H_
  9. #include <stdint.h>
  10. typedef struct {
  11. uint8_t second;
  12. uint8_t minute;
  13. uint8_t heure;
  14. uint8_t jour;
  15. uint8_t joursemaine;
  16. uint8_t mois;
  17. uint16_t annee;
  18. } Date;
  19. typedef struct {
  20. uint8_t minute;
  21. uint8_t heure;
  22. } Heure;
  23. /**
  24. * fonction qui renvoie
  25. * -1 si h1 est inf�rieur que H2
  26. * 0 si h1 et h2 egale
  27. * 1 si h1 est sup�rieur a h2
  28. */
  29. int8_t CompareHeure(Heure h1, Heure h2);
  30. int16_t DiffHeure(Heure h1, Heure h2);
  31. int32_t DiffDate(Date h1, Date h2);
  32. #endif /* HEURE_H_ */