aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/debugger/qqmlprofilerservice/data/controlFromJS.qml
blob: 3a7c093fa521c934b4454306dcded9e78c8ae2b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

import QtQml 2.0

QtObject {
    property var timer: Timer {
        running: true
        interval: 1
        onTriggered: {
            console.profile();
            stopTimer.start();
        }
    }

    property var stopTimer: Timer {
        id: stopTimer
        interval: 1000
        onTriggered: {
            console.profileEnd();
        }
    }
}