CMS 3D CMS Logo

Defines | Functions

/data/refman/pasoursint/CMSSW_5_3_0/src/Utilities/RFIOAdaptor/src/RFIOFile.cc File Reference

#include "Utilities/RFIOAdaptor/interface/RFIOFile.h"
#include "Utilities/RFIOAdaptor/interface/RFIO.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/Utilities/interface/EDMException.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.

Defines

#define __STDC_LIMIT_MACROS   1

Functions

static double realNanoSecs (void)

Define Documentation

#define __STDC_LIMIT_MACROS   1

Definition at line 1 of file RFIOFile.cc.


Function Documentation

static double realNanoSecs ( void  ) [static]

Definition at line 16 of file RFIOFile.cc.

References CLOCK_REALTIME.

Referenced by RFIOFile::read().

{
#if _POSIX_TIMERS > 0
  struct timespec tm;
  if (clock_gettime(CLOCK_REALTIME, &tm) == 0)
    return tm.tv_sec * 1e9 + tm.tv_nsec;
#else
  struct timeval tm;
  if (gettimeofday(&tm, 0) == 0)
    return tm.tv_sec * 1e9 + tm.tv_usec * 1e3;
#endif
  return 0;
}