From 5771a619ad7f0cfb279465695e39ec4b07d64328 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 15 Feb 2020 00:59:21 +0100 Subject: Clipboard.c: add elapsed time for lastClient to stats output if available --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 10 ++++++++-- 1 file 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)); -- cgit v1.2.3