Sonde
v1.1.0
Embeddable Model Context Protocol server for Qt applications
Toggle main menu visibility
Loading...
Searching...
No Matches
stalleventsource.h
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <
sonde/eventsource.h
>
7
8
#include <chrono>
9
#include <functional>
10
11
namespace
Sonde
{
12
13
class
StallEventSourcePrivate
;
14
33
class
SONDE_CORE_EXPORT
StallEventSource
:
public
EventSource
34
{
35
Q_OBJECT
36
public
:
38
explicit
StallEventSource
(std::chrono::milliseconds
threshold
= std::chrono::milliseconds(250),
39
QObject *parent =
nullptr
);
41
~StallEventSource
()
override
;
42
44
std::chrono::milliseconds
threshold
()
const
;
45
51
void
setBackgroundCheck
(std::function<
bool
()> inBackground);
52
53
private
:
54
friend
class
StallEventSourcePrivate;
55
PrivatePtr<StallEventSourcePrivate>
d
;
56
};
57
58
}
// namespace Sonde
Sonde::EventSource::EventSource
EventSource(QString name, QString description={ }, QObject *parent=nullptr)
Creates a source called name (used in filters and resource URIs), described by description in the eve...
Definition
eventsource.cpp:18
Sonde::PrivatePtr
Owns a class's private part, like std::unique_ptr, but a const owner only gets a const pointer,...
Definition
privateptr.h:20
Sonde::StallEventSourcePrivate
StallEventSource's private part.
Definition
stalleventsource_p.h:20
Sonde::StallEventSource::d
PrivatePtr< StallEventSourcePrivate > d
Implementation.
Definition
stalleventsource.h:55
Sonde::StallEventSource::StallEventSource
StallEventSource(std::chrono::milliseconds threshold=std::chrono::milliseconds(250), QObject *parent=nullptr)
Starts watching the current thread; stalls longer than threshold are reported.
Definition
stalleventsource.cpp:38
Sonde::StallEventSource::threshold
std::chrono::milliseconds threshold() const
The shortest stall reported.
Definition
stalleventsource.cpp:86
Sonde::StallEventSource::setBackgroundCheck
void setBackgroundCheck(std::function< bool()> inBackground)
Sets a check for "the application is in the background".
Definition
stalleventsource.cpp:91
eventsource.h
Sonde::EventSource, the base class of event streams.
Sonde
Embeddable Model Context Protocol server for Qt applications.
Definition
dispatch.cpp:10
src
core
sonde
stalleventsource.h
Generated by
1.18.0