Skip to content

ElapsedTimer

Base classes

Name Children Inherits
QElapsedTimer
PySide6.QtCore
QElapsedTimer(self, /) -> None

⋔ Inheritance diagram

graph TD
  3672716891["core.ElapsedTimer"]
  942554958["QtCore.QElapsedTimer"]
  37984305["Shiboken.Object"]
  2751680898["builtins.object"]
  942554958 --> 3672716891
  37984305 --> 942554958
  2751680898 --> 37984305

🛈 DocStrings

Bases: QElapsedTimer

Fast way to calculate elapsed times.

Source code in prettyqt/core/elapsedtimer.py
class ElapsedTimer(QtCore.QElapsedTimer):
    """Fast way to calculate elapsed times."""

    def __bool__(self):
        return self.isValid()

    def get_clock_type(self) -> ClockTypeStr:
        """Return current clock type.

        Returns:
            clock type
        """
        return CLOCK_TYPE.inverse[self.clockType()]

get_clock_type() -> ClockTypeStr

Return current clock type.

Source code in prettyqt/core/elapsedtimer.py
def get_clock_type(self) -> ClockTypeStr:
    """Return current clock type.

    Returns:
        clock type
    """
    return CLOCK_TYPE.inverse[self.clockType()]

:fa-brands-github: Show source on GitHub