# VectorNav C++ Library: include/vn/vntime.h Source File

vntime.h
#ifndef _VNXPLAT_TIME_H_
#define _VNXPLAT_TIME_H_
#include "int.h"
#include "export.h"
namespace vn {
namespace xplat {
struct vn_proglib_DLLEXPORT TimeStamp
{
public:
TimeStamp();
private:
TimeStamp(int64_t sec, uint64_t usec);
public:
// \brief Returns a timestamp.
//
// \return The timestamp.
static TimeStamp get();
// HACK: Current values are made public until the TimeStamp interface
// is fully worked out.
//private:
public:
int64_t _sec; // Seconds.
uint64_t _usec; // Microseconds.
};
class vn_proglib_DLLEXPORT Stopwatch
{
public:
Stopwatch();
~Stopwatch();
void reset();
float elapsedMs();
private:
struct Impl;
Impl *_pi;
};
}
}
#endif
int.h
vn::xplat::Stopwatch
Provides simple timing capabilities.
Definition: vntime.h:34
vn::xplat::TimeStamp
Definition: vntime.h:10
xplat
Definition: mock.h:4
vn
Definition: attitude.h:8