Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KSysGuard
Commits
f2509279
Commit
f2509279
authored
Oct 08, 2020
by
David Redondo
🏎
Browse files
Do not update sysctl sensor if it is not subscribed
parent
fbd7c1e3
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/global/cpu/sysctlsensor.h
View file @
f2509279
...
...
@@ -45,6 +45,9 @@ SysctlSensor<T>::SysctlSensor(const QString& id, const QByteArray &sysctlName, S
template
<
typename
T
>
void
SysctlSensor
<
T
>::
update
()
{
if
(
!
isSubscribed
())
{
return
;
}
T
value
;
size_t
size
=
sizeof
(
T
);
if
(
sysctlbyname
(
m_sysctlName
.
constData
(),
&
value
,
&
size
,
nullptr
,
0
)
!=
-
1
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment