nidas v1.2.3
Classes | Namespaces | Functions
UTime.h File Reference
#include <sys/types.h>
#include <sys/time.h>
#include <ctime>
#include <iostream>
#include <cctype>
#include <cmath>
#include <climits>
#include <locale>
#include <string>
#include "ThreadSupport.h"
#include "ParseException.h"
#include "time_constants.h"
#include "IOException.h"

Go to the source code of this file.

Classes

class  nidas::util::UTime
 A class for parsing, formatting and doing operations on time, based on Unix time conventions, where leap seconds are ignored, so that there are always 60 seconds in a minute, 3600 seconds in an hour and 86400 seconds in a day. More...
 
class  nidas::util::UTime_stream_manip< charT >
 class for changing output format of UTime on ostream, in a way like the standard stream manipulator classes. More...
 

Namespaces

namespace  nidas
 Root namespace for the NCAR In-Situ Data Acquisition Software.
 
namespace  nidas::util
 General utility classes. nidas::util contains classes of general utility, like Socket, Thread, etc. The classes use only the standard Unix system libraries and libstdc++, and have no dependency on other external packages such as an XML parser, or a logging package.
 

Functions

template<typename charT >
std::basic_ostream< charT, std::char_traits< charT > > & nidas::util::operator<< (std::basic_ostream< charT, std::char_traits< charT > > &os, const UTime &x)
 
template<typename charT >
std::basic_ostream< charT, std::char_traits< charT > > & nidas::util::operator<< (std::basic_ostream< charT, std::char_traits< charT > > &os, const UTime_stream_manip< charT > &m)
 
template<typename charT >
UTime_stream_manip< charT > nidas::util::setDefaultFormat (const std::string &val)
 Function to set the default UTime output format on an ostream.
 
template<typename charT >
UTime_stream_manip< charT > nidas::util::setTZ (const std::string &val)
 Function to set the UTime timezone on an ostream.
 
long long nidas::util::getSystemTime ()
 Return the current unix system time, in microseconds since Jan 1, 1970, 00:00 GMT.
 
long long nidas::util::timeCeiling (long long t, long long delta)
 Return smallest time that is an integral multiple of delta, that isn't less than or equal to argument t.
 
long long nidas::util::timeFloor (long long t, long long delta)
 Return largest time that is an integral multiple of delta, that isn't greater than argument t.
 
bool nidas::util::sleepUntil (unsigned int periodMsec, unsigned int offsetMsec=0)
 Utility function, sleeps until the next even period + offset.