Skip to content

ElapsedTimer

Qt Base Class: QElapsedTimer

Signature: QElapsedTimer(self) -> None QElapsedTimer(self, QElapsedTimer: PySide6.QtCore.QElapsedTimer) -> None

Base classes

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

⋔ Inheritance diagram

graph TD
  1473299807216["core.ElapsedTimer"]
  1473288936912["QtCore.QElapsedTimer"]
  1473291690208["Shiboken.Object"]
  140713234304496["builtins.object"]
  1473288936912 --> 1473299807216
  1473291690208 --> 1473288936912
  140713234304496 --> 1473291690208

🛈 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()]