CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions
RFIOFile.cc File Reference
#include "Utilities/RFIOAdaptor/interface/RFIOFile.h"
#include "Utilities/RFIOAdaptor/interface/RFIO.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <cerrno>
#include <unistd.h>
#include <stdint.h>
#include <time.h>
#include <sys/time.h>
#include <cstring>
#include <vector>

Go to the source code of this file.

Macros

#define __STDC_LIMIT_MACROS   1
 

Functions

static double realNanoSecs (void)
 

Macro Definition Documentation

#define __STDC_LIMIT_MACROS   1

Definition at line 1 of file RFIOFile.cc.

Function Documentation

static double realNanoSecs ( void  )
static

Definition at line 15 of file RFIOFile.cc.

Referenced by RFIOFile::read().

16 {
17 #if _POSIX_TIMERS > 0
18  struct timespec tm;
19  if (clock_gettime(CLOCK_REALTIME, &tm) == 0)
20  return tm.tv_sec * 1e9 + tm.tv_nsec;
21 #else
22  struct timeval tm;
23  if (gettimeofday(&tm, 0) == 0)
24  return tm.tv_sec * 1e9 + tm.tv_usec * 1e3;
25 #endif
26  return 0;
27 }