time.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/time.h
  3. // Purpose: Time-related functions.
  4. // Author: Vadim Zeitlin
  5. // Created: 2011-11-27
  6. // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
  7. // Licence: wxWindows licence
  8. /////////////////////////////////////////////////////////////////////////////
  9. /** @addtogroup group_funcmacro_time */
  10. //@{
  11. /**
  12. Returns the difference between UTC and local time in seconds.
  13. @header{wx/time.h}
  14. */
  15. int wxGetTimeZone();
  16. /**
  17. Returns the number of seconds since local time 00:00:00 Jan 1st 1970.
  18. @see wxDateTime::Now()
  19. @header{wx/time.h}
  20. */
  21. long wxGetLocalTime();
  22. /**
  23. Returns the number of milliseconds since local time 00:00:00 Jan 1st 1970.
  24. The use of wxGetUTCTimeMillis() is preferred as it provides a usually
  25. (except for changes to the system time) monotonic clock which the local
  26. time also changes whenever DST begins or ends.
  27. @see wxDateTime::Now(), wxGetUTCTimeMillis(), wxGetUTCTimeUSec()
  28. @header{wx/time.h}
  29. */
  30. wxLongLong wxGetLocalTimeMillis();
  31. /**
  32. Returns the number of seconds since GMT 00:00:00 Jan 1st 1970.
  33. @see wxDateTime::Now()
  34. @header{wx/time.h}
  35. */
  36. long wxGetUTCTime();
  37. /**
  38. Returns the number of milliseconds since GMT 00:00:00 Jan 1st 1970.
  39. @header{wx/time.h}
  40. @since 2.9.3
  41. */
  42. wxLongLong wxGetUTCTimeMillis();
  43. /**
  44. Returns the number of microseconds since GMT 00:00:00 Jan 1st 1970.
  45. @header{wx/time.h}
  46. @since 2.9.3
  47. */
  48. wxLongLong wxGetUTCTimeUSec();
  49. //@}