diff options
Diffstat (limited to 'resourceqt-client')
-rw-r--r-- | resourceqt-client/client.cpp | 14 | ||||
-rw-r--r-- | resourceqt-client/client.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/resourceqt-client/client.cpp b/resourceqt-client/client.cpp index 804ac56..fe15586 100644 --- a/resourceqt-client/client.cpp +++ b/resourceqt-client/client.cpp @@ -129,11 +129,15 @@ bool Client::initialize(const CommandLineParser &parser) if (!connect(&stdInNotifier, SIGNAL(activated(int)), this, SLOT(readLine(int)))) { return false; } + if (!connect(resourceSet , SIGNAL(connectedToManager()), this, SLOT(stopConnectTimerHandler()))) { + return false; + } if (!connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(doExit()))) { return false; } + start_timer(); resourceSet->initAndConnect(); output << "connecting...accepting input" << endl; showPrompt(); @@ -146,6 +150,7 @@ void Client::doExit() resourceSet->release(); } + const char * resourceTypeToString(ResourceType type) { switch (type) { @@ -201,6 +206,15 @@ void Client::showResources(const QList<Resource*> &resList) } } +void Client::stopConnectTimerHandler() +{ + long int ms = stop_timer(); + if (ms > 0) { + outputln << "Register took " << ms << "ms" << endl; + } + +} + void Client::resourceAcquiredHandler(const QList<ResourceType>&) { long int ms = stop_timer(); diff --git a/resourceqt-client/client.h b/resourceqt-client/client.h index c22475d..342f5f9 100644 --- a/resourceqt-client/client.h +++ b/resourceqt-client/client.h @@ -62,6 +62,7 @@ private slots: void resourcesBecameAvailableHandler(const QList<ResourcePolicy::ResourceType> &availableResources); void readLine(int); void doExit(); + void stopConnectTimerHandler(); private: QTextStream standardInput; |