Goby3  3.1.4
2024.02.22
boost::asio::time_traits< goby::time::ASIOGobyTime > Struct Reference

Time traits specialised for GobyTime. More...

#include <goby/time/asio.h>

Public Types

typedef boost::posix_time::ptime time_type
 The time type. More...
 
typedef boost::posix_time::time_duration duration_type
 The duration type. More...
 

Static Public Member Functions

static time_type now ()
 Get the current time. More...
 
static time_type add (const time_type &t, const duration_type &d)
 Add a duration to a time. More...
 
static duration_type subtract (const time_type &t1, const time_type &t2)
 Subtract one time from another. More...
 
static bool less_than (const time_type &t1, const time_type &t2)
 Test whether one time is less than another. More...
 
static boost::posix_time::time_duration to_posix_duration (const duration_type &d)
 Convert to POSIX duration type. More...
 

Detailed Description

Time traits specialised for GobyTime.

Definition at line 47 of file asio.h.

Member Typedef Documentation

◆ duration_type

typedef boost::posix_time::time_duration boost::asio::time_traits< goby::time::ASIOGobyTime >::duration_type

The duration type.

Definition at line 53 of file asio.h.

◆ time_type

typedef boost::posix_time::ptime boost::asio::time_traits< goby::time::ASIOGobyTime >::time_type

The time type.

Definition at line 50 of file asio.h.

Member Function Documentation

◆ add()

static time_type boost::asio::time_traits< goby::time::ASIOGobyTime >::add ( const time_type t,
const duration_type d 
)
inlinestatic

Add a duration to a time.

Definition at line 59 of file asio.h.

◆ less_than()

static bool boost::asio::time_traits< goby::time::ASIOGobyTime >::less_than ( const time_type t1,
const time_type t2 
)
inlinestatic

Test whether one time is less than another.

Definition at line 65 of file asio.h.

◆ now()

static time_type boost::asio::time_traits< goby::time::ASIOGobyTime >::now ( )
inlinestatic

Get the current time.

Definition at line 56 of file asio.h.

◆ subtract()

static duration_type boost::asio::time_traits< goby::time::ASIOGobyTime >::subtract ( const time_type t1,
const time_type t2 
)
inlinestatic

Subtract one time from another.

Definition at line 62 of file asio.h.

◆ to_posix_duration()

static boost::posix_time::time_duration boost::asio::time_traits< goby::time::ASIOGobyTime >::to_posix_duration ( const duration_type d)
inlinestatic

Convert to POSIX duration type.

Definition at line 68 of file asio.h.


The documentation for this struct was generated from the following file: