- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
static std::string printFloatNumber(float num,bool friendly=false)
{
std::ostringstream out ;
if(friendly)
{
char tmp[100] ;
std::string units[4] = { "B/s","KB/s","MB/s","GB/s" } ;
int k=0 ;
while(num >= 800.0f && k<5)
num /= 1024.0f,++k;
sprintf(tmp,"%3.2f %s",num,units[k].c_str()) ;
return std::string(tmp) ;
}
else
{
out << num ;
return out.str() ;
}
}
Lure Of Chaos 04.03.2012 23:23 # 0
absolut 05.03.2012 01:17 # 0
rat4 05.03.2012 07:45 # 0
defecate-plusplus 05.03.2012 16:02 # 0
guest 06.03.2012 14:35 # +3
Steve_Brown 07.03.2012 10:38 # +4
absolut 07.03.2012 13:07 # +6
rat4 09.03.2012 21:18 # 0
guest 09.03.2012 21:34 # 0
bugmenot 10.03.2012 12:08 # +1
guest8 09.04.2019 12:47 # −999