diff --git a/xwords4/relay/ctrl.cpp b/xwords4/relay/ctrl.cpp index 31f598b2e..460ebe279 100644 --- a/xwords4/relay/ctrl.cpp +++ b/xwords4/relay/ctrl.cpp @@ -360,7 +360,7 @@ format_uptime( char* buf, int len ) seconds %= 60; snprintf( buf, len, - "uptime: %d days, %d hours, %d minutes, %ld seconds", + "uptime: %d D, %d H, %d M, %ld S", days, hours, minutes, seconds ); } diff --git a/xwords4/relay/http.cpp b/xwords4/relay/http.cpp index 6214ba8c5..7c546b5e2 100644 --- a/xwords4/relay/http.cpp +++ b/xwords4/relay/http.cpp @@ -95,16 +95,6 @@ send_meta( FILE* fil ) fprintf( fil, "" ); } -static void -printUptime( FILE* fil ) -{ - char buf[128]; - - fprintf( fil, "
%s
", buf ); -} - static void printTail( FILE* fil ) { @@ -163,10 +153,14 @@ printStats( FILE* fil ) CRefMgr* cmgr = CRefMgr::Get(); int nGames = cmgr->GetNumGamesSeen(); int siz = cmgr->GetSize(); + char uptime[64]; + format_uptime( uptime, sizeof(uptime) ); fprintf( fil, "Games played | Games in play | |
---|---|---|
%d | %d | |
Games played | Games in play | " + "Uptime |
%d | %d | %s |