GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
time Class Reference

#include "oct-time.h"

Collaboration diagram for time:

Public Member Functions

OCTAVE_API time (const base_tm &tm)
 
 time (const time &ot)
 
OCTAVE_API time (double d)
 
 time (OCTAVE_TIME_T t)
 
 time (OCTAVE_TIME_T t, long us)
 
 time (void)
 
 ~time (void)=default
 
OCTAVE_API std::string ctime (void) const
 
double double_value (void) const
 
timeoperator= (const time &ot)
 
OCTAVE_API void stamp (void)
 
OCTAVE_TIME_T unix_time (void) const
 
long usec (void) const
 

Private Attributes

OCTAVE_TIME_T m_ot_unix_time
 
long m_ot_usec
 

Friends

OCTAVE_API std::ostream & operator<< (std::ostream &os, const time &ot)
 

Detailed Description

Definition at line 50 of file oct-time.h.

Constructor & Destructor Documentation

◆ time() [1/6]

time::time ( void  )
inline

Definition at line 55 of file oct-time.h.

◆ time() [2/6]

time::time ( OCTAVE_TIME_T  t)
inline

Definition at line 58 of file oct-time.h.

◆ time() [3/6]

time::time ( OCTAVE_TIME_T  t,
long  us 
)
inline

Definition at line 61 of file oct-time.h.

References rem().

◆ time() [4/6]

time::time ( double  d)

Definition at line 55 of file oct-time.cc.

References d.

◆ time() [5/6]

◆ time() [6/6]

time::time ( const time ot)
inline

Definition at line 87 of file oct-time.h.

◆ ~time()

time::~time ( void  )
default

Member Function Documentation

◆ ctime()

std::string time::ctime ( void  ) const

Definition at line 97 of file oct-time.cc.

References base_tm::asctime().

◆ double_value()

double time::double_value ( void  ) const
inline

Definition at line 105 of file oct-time.h.

References as_double().

◆ operator=()

time& time::operator= ( const time ot)
inline

Definition at line 90 of file oct-time.h.

References m_ot_unix_time, and m_ot_usec.

◆ stamp()

void time::stamp ( void  )

Definition at line 114 of file oct-time.cc.

References m_ot_unix_time, m_ot_usec, and octave_gettimeofday_wrapper().

◆ unix_time()

OCTAVE_TIME_T time::unix_time ( void  ) const
inline

Definition at line 110 of file oct-time.h.

Referenced by localtime::init(), gmtime::init(), operator+(), operator<(), operator==(), and operator>().

◆ usec()

long time::usec ( void  ) const
inline

Definition at line 112 of file oct-time.h.

Referenced by localtime::init(), gmtime::init(), operator+(), operator<(), operator==(), and operator>().

Friends And Related Function Documentation

◆ operator<<

OCTAVE_API std::ostream& operator<< ( std::ostream &  os,
const time ot 
)
friend

Definition at line 102 of file oct-time.cc.

Member Data Documentation

◆ m_ot_unix_time

OCTAVE_TIME_T time::m_ot_unix_time
private

Definition at line 121 of file oct-time.h.

Referenced by time(), operator=(), and stamp().

◆ m_ot_usec

long time::m_ot_usec
private

Definition at line 124 of file oct-time.h.

Referenced by time(), operator=(), and stamp().


The documentation for this class was generated from the following files: