Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
Loading...
Searching...
No Matches
Stopwatch.h
Go to the documentation of this file.
1
/*
2
* Deskflow -- mouse and keyboard sharing utility
3
* SPDX-FileCopyrightText: (C) 2012 - 2016 Synergy App Ltd
4
* SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman
5
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
6
*/
7
8
#pragma once
9
11
15
class
Stopwatch
16
{
17
public
:
22
explicit
Stopwatch
(
bool
triggered =
false
);
23
~Stopwatch
() =
default
;
24
26
27
29
35
double
reset
();
36
38
43
void
stop
();
44
46
50
void
start
();
51
53
59
void
setTrigger
();
60
62
66
double
getTime
();
68
70
72
75
bool
isStopped
()
const
;
76
77
// return the time since the last reset().
79
83
double
getTime
()
const
;
85
86
private
:
87
double
getClock()
const
;
88
89
private
:
90
double
m_mark = 0.0;
91
bool
m_triggered =
false
;
92
bool
m_stopped =
false
;
93
};
Stopwatch::getTime
double getTime()
Get elapsed time.
Definition
Stopwatch.cpp:65
Stopwatch::start
void start()
Start the timer.
Definition
Stopwatch.cpp:47
Stopwatch::Stopwatch
Stopwatch(bool triggered=false)
Definition
Stopwatch.cpp:15
Stopwatch::isStopped
bool isStopped() const
Check if timer is stopped.
Definition
Stopwatch.cpp:78
Stopwatch::setTrigger
void setTrigger()
Stop the timer and set the trigger.
Definition
Stopwatch.cpp:59
Stopwatch::stop
void stop()
Stop the timer.
Definition
Stopwatch.cpp:36
Stopwatch::~Stopwatch
~Stopwatch()=default
Stopwatch::reset
double reset()
Reset the timer to zero.
Definition
Stopwatch.cpp:22
src
lib
base
Stopwatch.h
Generated by
1.18.0