CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
WatcherStreamFileReader.cc File Reference
#include "IOPool/Streamer/interface/MsgTools.h"
#include "IOPool/Streamer/interface/StreamerInputFile.h"
#include "CalibCalorimetry/EcalLaserSorting/interface/WatcherStreamFileReader.h"
#include "FWCore/Utilities/interface/Exception.h"
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <cstring>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <fcntl.h>
#include <libgen.h>
#include <fstream>

Go to the source code of this file.

Functions

static std::string now ()
 

Function Documentation

static std::string now ( )
static

Definition at line 110 of file WatcherStreamFileReader.cc.

Referenced by WatcherStreamFileReader::closeFile(), and WatcherStreamFileReader::getInputFile().

110  {
111  struct timeval t;
112  gettimeofday(&t, 0);
113 
114  char buf[256];
115  strftime(buf, sizeof(buf), "%F %R %S s", localtime(&t.tv_sec));
116  buf[sizeof(buf)-1] = 0;
117 
118  stringstream buf2;
119  buf2 << buf << " " << ((t.tv_usec+500)/1000) << " ms";
120 
121  return buf2.str();
122 }