KiCad PCB EDA Suite
Loading...
Searching...
No Matches
time_limit.cpp
Go to the documentation of this file.
1
/*
2
* KiRouter - a push-and-(sometimes-)shove PCB router
3
*
4
* Copyright (C) 2013-2014 CERN
5
* Copyright (C) 2016 KiCad Developers, see AUTHORS.txt for contributors.
6
* Author: Tomasz Wlostowski <
[email protected]
>
7
*
8
* This program is free software: you can redistribute it and/or modify it
9
* under the terms of the GNU General Public License as published by the
10
* Free Software Foundation, either version 3 of the License, or (at your
11
* option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful, but
14
* WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License along
19
* with this program. If not, see <http://www.gnu.org/licenses/>.
20
*/
21
22
#include <wx/timer.h>
23
24
#include "
time_limit.h
"
25
26
namespace
PNS
{
27
28
TIME_LIMIT::TIME_LIMIT
(
int
aMilliseconds ) :
29
m_limitMs( aMilliseconds )
30
{
31
Restart
();
32
}
33
34
35
TIME_LIMIT::~TIME_LIMIT
()
36
{}
37
38
39
bool
TIME_LIMIT::Expired
()
const
40
{
41
return
( wxGetLocalTimeMillis().GetValue() -
m_startTics
) >=
m_limitMs
;
42
}
43
44
45
void
TIME_LIMIT::Restart
()
46
{
47
m_startTics
= wxGetLocalTimeMillis().GetValue();
48
}
49
50
51
void
TIME_LIMIT::Set
(
int
aMilliseconds )
52
{
53
m_limitMs
= aMilliseconds;
54
}
55
56
}
PNS::TIME_LIMIT::Restart
void Restart()
Definition:
time_limit.cpp:45
PNS::TIME_LIMIT::Set
void Set(int aMilliseconds)
Definition:
time_limit.cpp:51
PNS::TIME_LIMIT::TIME_LIMIT
TIME_LIMIT(int aMilliseconds=0)
Definition:
time_limit.cpp:28
PNS::TIME_LIMIT::m_startTics
int64_t m_startTics
Definition:
time_limit.h:43
PNS::TIME_LIMIT::~TIME_LIMIT
~TIME_LIMIT()
Definition:
time_limit.cpp:35
PNS::TIME_LIMIT::Expired
bool Expired() const
Definition:
time_limit.cpp:39
PNS::TIME_LIMIT::m_limitMs
int m_limitMs
Definition:
time_limit.h:42
PNS
Push and Shove diff pair dimensions (gap) settings dialog.
Definition:
dialog_pns_diff_pair_dimensions.h:33
time_limit.h
src
pcbnew
router
time_limit.cpp
Generated on Wed Oct 30 2024 00:04:56 for KiCad PCB EDA Suite by
1.9.6