Sha256: 1f633855a7972863f2061ac8d50e352f24ce0cbd4d1671354ce6d920a79d1e4a

Contents?: true

Size: 379 Bytes

Versions: 6

Compression:

Stored size: 379 Bytes

Contents

#include "xot/time.h"


#include <boost/date_time/posix_time/posix_time.hpp>

namespace pt = boost::posix_time;


namespace Xot
{


	double
	time (bool local)
	{
		static pt::ptime zero = pt::from_time_t(0);
		pt::ptime now = local ?
			pt::microsec_clock::local_time() :
			pt::microsec_clock::universal_time();
		return (now - zero).total_milliseconds() / 1000.0;
	}


}// Xot

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xot-0.1.12 src/time.cpp
xot-0.1.11 src/time.cpp
xot-0.1.10 src/time.cpp
xot-0.1.9 src/time.cpp
xot-0.1.8 src/time.cpp
xot-0.1.7 src/time.cpp