From 572372c92225e6d449da93b75add2d64b7bfe492 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Sun, 13 Nov 2011 02:40:12 +1000 Subject: [PATCH] Testing: Show duration next to live AHI --- Graphs/gLineOverlay.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Graphs/gLineOverlay.cpp b/Graphs/gLineOverlay.cpp index 86064e56..a88984fc 100644 --- a/Graphs/gLineOverlay.cpp +++ b/Graphs/gLineOverlay.cpp @@ -164,11 +164,19 @@ void gLineOverlaySummary::paint(gGraph & w,int left, int top, int width, int hei val=0; - time/=3600000; + time/=1000; + int h=time/3600; + int m=int(time/60) % 60; + int s=int(time) % 60; + + + time/=3600; //if (time<1) time=1; if (time>0) val=cnt/time; - QString a=m_text+"="+QString::number(val,'f',2); + + + QString a=m_text+"="+QString::number(val,'f',2)+" Duration="+QString().sprintf("%02i:%02i:%02i",h,m,s); w.renderText(a,left+m_x,top+m_y); }