FACT++  1.0
string WindowLog::GetSizeStr ( ) const

Returns the size of the backlog buffer as string.

Returns
Size of the backlog as a string, e.g. "1k"

Definition at line 278 of file WindowLog.cc.

References str.

Referenced by Console::GetLinePrompt(), and GetSizeBacklog().

279 {
280  int s = GetSizeBacklog()/1000;
281  if (s==0)
282  return "0";
283 
284  char u = 'k';
285  if (s>999)
286  {
287  s/=1000;
288  u = 'M';
289  }
290 
291  ostringstream str;
292  str << s << u;
293  return str.str();
294 }
char str[80]
Definition: test_client.c:7
size_t GetSizeBacklog() const
Get the current size of the backlog in bytes.
Definition: WindowLog.h:133

+ Here is the caller graph for this function: