added statistics info for key requests

This commit is contained in:
csoler 2016-12-22 00:14:16 +01:00
parent d3051eff1a
commit 0a3ec9706d
12 changed files with 37 additions and 29 deletions

View file

@ -36,9 +36,13 @@
#include <sys/timeb.h>
#endif
std::string RsUtil::NumberToString(uint64_t n)
std::string RsUtil::NumberToString(uint64_t n,bool hex)
{
std::ostringstream os ;
if(hex)
os << std::hex ;
os << n ;
os.flush() ;

View file

@ -36,7 +36,7 @@ namespace RsUtil {
std::string BinToHex(const std::string &bin);
std::string BinToHex(const char *arr, const uint32_t len);
std::string BinToHex(const unsigned char *arr, const uint32_t len);
std::string NumberToString(uint64_t n);
std::string NumberToString(uint64_t n, bool hex=false);
std::string HashId(const std::string &id, bool reverse = false);
//std::string AccurateTimeString();