From accccc212cd4f08a3c5532b1ae7a17e76bac8718 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 6 May 2013 11:49:50 +0100 Subject: Replace some C-isms with C++-isms. * 'const char*' to 'const std::string&'. * snprintf to std::string concatenation. * Replace duplicated OneOfMatches with InspIRCd::MatchMask. --- src/commands/cmd_stats.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/commands/cmd_stats.cpp') diff --git a/src/commands/cmd_stats.cpp b/src/commands/cmd_stats.cpp index ccf753956..d9f3c1496 100644 --- a/src/commands/cmd_stats.cpp +++ b/src/commands/cmd_stats.cpp @@ -283,7 +283,7 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results) double n_eaten = (double)( ( (uint64_t)(KernelTime.dwHighDateTime - ServerInstance->stats->LastCPU.dwHighDateTime) << 32 ) + (uint64_t)(KernelTime.dwLowDateTime - ServerInstance->stats->LastCPU.dwLowDateTime) )/100000; double n_elapsed = (double)(ThisSample.QuadPart - ServerInstance->stats->LastSampled.QuadPart) / ServerInstance->stats->QPFrequency.QuadPart; double per = (n_eaten/n_elapsed); - + char percent[30]; snprintf(percent, 30, "%03.5f%%", per); -- cgit v1.3.1-10-gc9f91