time.h 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. *
  3. * NMEA library
  4. * URL: http://nmea.sourceforge.net
  5. * Author: Tim (xtimor@gmail.com)
  6. * Licence: http://www.gnu.org/licenses/lgpl.html
  7. * $Id: time.h 4 2007-08-27 13:11:03Z xtimor $
  8. *
  9. */
  10. /*! \file */
  11. #ifndef __NMEA_TIME_H__
  12. #define __NMEA_TIME_H__
  13. #include "config.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /**
  18. * Date and time data
  19. * @see nmea_time_now
  20. */
  21. typedef struct _nmeaTIME
  22. {
  23. int year; /**< Years since 1900 */
  24. int mon; /**< Months since January - [0,11] */
  25. int day; /**< Day of the month - [1,31] */
  26. int hour; /**< Hours since midnight - [0,23] */
  27. int min; /**< Minutes after the hour - [0,59] */
  28. int sec; /**< Seconds after the minute - [0,59] */
  29. int hsec; /**< Hundredth part of second - [0,99] */
  30. } nmeaTIME;
  31. /**
  32. * \brief Get time now to nmeaTIME structure
  33. */
  34. void nmea_time_now(nmeaTIME *t);
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif /* __NMEA_TIME_H__ */