CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
StorageAccount.cc File Reference
#include "Utilities/StorageFactory/interface/StorageAccount.h"
#include <boost/thread/mutex.hpp>
#include <sstream>
#include <unistd.h>

Go to the source code of this file.

Functions

static std::string d2str (double d)
 
static std::string i2str (int i)
 
static double timeRealNanoSecs (void)
 

Variables

boost::mutex s_mutex
 
StorageAccount::StorageStats s_stats
 

Function Documentation

static std::string d2str ( double  d)
static

Definition at line 28 of file StorageAccount.cc.

References edmStreamStallGrapher::t.

Referenced by StorageAccount::fillSummary().

28  {
29  std::ostringstream t;
30  t << d;
31  return t.str();
32 }
static std::string i2str ( int  i)
static

Definition at line 22 of file StorageAccount.cc.

References i, and edmStreamStallGrapher::t.

Referenced by StorageAccount::fillSummary().

22  {
23  std::ostringstream t;
24  t << i;
25  return t.str();
26 }
int i
Definition: DBlmapReader.cc:9
static double timeRealNanoSecs ( void  )
static

Definition at line 9 of file StorageAccount.cc.

References CLOCK_REALTIME.

Referenced by StorageAccount::Stamp::tick().

9  {
10 #if _POSIX_TIMERS > 0
11  struct timespec tm;
12  if (clock_gettime(CLOCK_REALTIME, &tm) == 0)
13  return tm.tv_sec * 1e9 + tm.tv_nsec;
14 #else
15  struct timeval tm;
16  if (gettimeofday(&tm, 0) == 0)
17  return tm.tv_sec * 1e9 + tm.tv_usec * 1e3;
18 #endif
19  return 0;
20 }
#define CLOCK_REALTIME
Definition: TimerService.h:32

Variable Documentation

boost::mutex s_mutex