aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-02-15 00:59:21 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-31 12:52:35 +0200
commit5771a619ad7f0cfb279465695e39ec4b07d64328 (patch)
treec90d6d975745678855ae94c788412de2839d4a00
parent6db07e9959c39d66ef40f1b2c1ac85da255ff91b (diff)
downloadnx-libs-5771a619ad7f0cfb279465695e39ec4b07d64328.tar.gz
nx-libs-5771a619ad7f0cfb279465695e39ec4b07d64328.tar.bz2
nx-libs-5771a619ad7f0cfb279465695e39ec4b07d64328.zip
Clipboard.c: add elapsed time for lastClient to stats output if available
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 9c9ba1af3..bac2e41ce 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -360,8 +360,14 @@ void nxagentDumpClipboardStat(void)
fprintf(stderr, " lastClientProperty (Atom) [% 4d][%s]\n", lastClientProperty, NameForAtom(lastClientProperty));
fprintf(stderr, " lastClientSelection (Atom) [% 4d][%s]\n", lastClientSelection, NameForAtom(lastClientSelection));
fprintf(stderr, " lastClientTarget (Atom) [% 4d][%s]\n", lastClientTarget, NameForAtom(lastClientTarget));
- fprintf(stderr, " lastClientTime (Time) [%u]\n", lastClientTime);
- fprintf(stderr, " lastClientReqTime (Time) [%u]\n", lastClientReqTime);
+ if (lastClientTime > 0)
+ fprintf(stderr, " lastClientTime (Time) [%u] ([%u]ms ago)\n", lastClientTime, GetTimeInMillis() - lastClientTime);
+ else
+ fprintf(stderr, " lastClientTime (Time) [%u]\n", lastClientTime);
+ if (lastClientReqTime > 0)
+ fprintf(stderr, " lastClientReqTime (Time) [%u] ([%u]ms ago)\n", lastClientReqTime, GetTimeInMillis() - lastClientReqTime);
+ else
+ fprintf(stderr, " lastClientReqTime (Time) [%u]\n", lastClientReqTime);
fprintf(stderr, " lastClientPropertySize (unsigned long) [%lu]\n", lastClientPropertySize);
fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d][%s]\n", lastClientStage, getClientSelectionStageString(lastClientStage));