[Positioning] Timestamp::Timestamp(owl_timestamp)
This commit is contained in:
parent
d193b49c9c
commit
c3c319a7f1
|
@ -19,6 +19,12 @@ Timestamp::Timestamp(const struct timespec &source)
|
|||
}
|
||||
|
||||
|
||||
Timestamp::Timestamp(const owl_timestamp &source)
|
||||
{
|
||||
set(source) ;
|
||||
}
|
||||
|
||||
|
||||
Timestamp::Timestamp(const uint_fast32_t source_s,
|
||||
const uint_fast32_t source_ns)
|
||||
{
|
||||
|
@ -48,6 +54,12 @@ inline void Timestamp::set(const struct timespec &source)
|
|||
}
|
||||
|
||||
|
||||
inline void Timestamp::set(const owl_timestamp &source)
|
||||
{
|
||||
set(source.tv_sec, source.tv_nsec) ;
|
||||
}
|
||||
|
||||
|
||||
inline void Timestamp::set(const uint_fast32_t source_s,
|
||||
const uint_fast32_t source_ns)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef _OWLPS_POSITIONING_TIMESTAMP_HH_
|
||||
#define _OWLPS_POSITIONING_TIMESTAMP_HH_
|
||||
|
||||
#include <owlps.h>
|
||||
|
||||
#include <ctime>
|
||||
#include <stdint.h> // <cstdint> is not C++ 98 compliant
|
||||
#include <ostream>
|
||||
|
@ -19,6 +21,7 @@ protected:
|
|||
/** @name Internal accessors */
|
||||
//@{
|
||||
void set(const struct timespec &source) ;
|
||||
void set(const owl_timestamp &source) ;
|
||||
void set(const uint_fast32_t source_s, const uint_fast32_t source_ns) ;
|
||||
/// Initialises the Timestamp with a value in milliseconds (deprecated)
|
||||
void set(const uint64_t source_ms) ;
|
||||
|
@ -43,6 +46,7 @@ protected:
|
|||
public:
|
||||
Timestamp(void) ;
|
||||
Timestamp(const struct timespec &source) ;
|
||||
Timestamp(const owl_timestamp &source) ;
|
||||
Timestamp(const uint_fast32_t source_s, const uint_fast32_t source_ns) ;
|
||||
/// Constructs a Timsestamp from a value in milliseconds (deprecated)
|
||||
Timestamp(const uint64_t source) ;
|
||||
|
|
Loading…
Reference in New Issue