qelapsedtimer.sip 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // qelapsedtimer.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QElapsedTimer
  22. {
  23. %TypeHeaderCode
  24. #include <qelapsedtimer.h>
  25. %End
  26. public:
  27. QElapsedTimer();
  28. enum ClockType
  29. {
  30. SystemTime,
  31. MonotonicClock,
  32. TickCounter,
  33. MachAbsoluteTime,
  34. PerformanceCounter,
  35. };
  36. static QElapsedTimer::ClockType clockType();
  37. static bool isMonotonic();
  38. void start();
  39. qint64 restart();
  40. void invalidate();
  41. bool isValid() const;
  42. qint64 elapsed() const;
  43. bool hasExpired(qint64 timeout) const;
  44. qint64 msecsSinceReference() const;
  45. qint64 msecsTo(const QElapsedTimer &other) const;
  46. qint64 secsTo(const QElapsedTimer &other) const;
  47. qint64 nsecsElapsed() const;
  48. };
  49. bool operator<(const QElapsedTimer &v1, const QElapsedTimer &v2);
  50. bool operator==(const QElapsedTimer &lhs, const QElapsedTimer &rhs);
  51. bool operator!=(const QElapsedTimer &lhs, const QElapsedTimer &rhs);
  52. %If (Qt_6_8_0 -)
  53. bool operator>(const QElapsedTimer &lhs, const QElapsedTimer &rhs);
  54. %End
  55. %If (Qt_6_8_0 -)
  56. bool operator<=(const QElapsedTimer &lhs, const QElapsedTimer &rhs);
  57. %End
  58. %If (Qt_6_8_0 -)
  59. bool operator>=(const QElapsedTimer &lhs, const QElapsedTimer &rhs);
  60. %End