ElapsedTimer: QtObject

import Quickshell

Measures time between events More

Functions

Detailed Description

The ElapsedTimer measures time since its last restart, and is useful for determining the time between events that don’t supply it.

Function Details

real elapsed()

Return the number of seconds since the timer was last started or restarted, with nanosecond precision.

int elapsedMs()

Return the number of milliseconds since the timer was last started or restarted.

int elapsedNs()

Return the number of nanoseconds since the timer was last started or restarted.

real restart()

Restart the timer, returning the number of seconds since the timer was last started or restarted, with nanosecond precision.

int restartMs()

Restart the timer, returning the number of milliseconds since the timer was last started or restarted.

int restartNs()

Restart the timer, returning the number of nanoseconds since the timer was last started or restarted.