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

#include "oct-time.h"

Collaboration diagram for octave::sys::time:

Public Member Functions

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

Private Attributes

time_t ot_unix_time
 
long ot_usec
 

Friends

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

Detailed Description

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

Constructor & Destructor Documentation

◆ time() [1/6]

octave::sys::time::time ( void  )
inline

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

◆ time() [2/6]

octave::sys::time::time ( time_t  t)
inline

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

◆ time() [3/6]

octave::sys::time::time ( time_t  t,
long  us 
)
inline

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

References rem().

◆ time() [4/6]

octave::sys::time::time ( double  d)

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

References d, and ot_usec.

◆ time() [5/6]

◆ time() [6/6]

octave::sys::time::time ( const time ot)
inline

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

◆ ~time()

octave::sys::time::~time ( void  )
default

Member Function Documentation

◆ ctime()

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

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

References octave::sys::base_tm::asctime().

◆ double_value()

double octave::sys::time::double_value ( void  ) const
inline

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

References as_double().

Referenced by Ftic(), Ftoc(), octave::profiler::query_time(), and octave::sleep().

◆ operator=()

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

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

References ot_unix_time, and ot_usec.

◆ stamp()

void octave::sys::time::stamp ( void  )

◆ unix_time()

◆ usec()

Friends And Related Function Documentation

◆ operator<<

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

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

Member Data Documentation

◆ ot_unix_time

time_t octave::sys::time::ot_unix_time
private

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

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

◆ ot_usec

long octave::sys::time::ot_usec
private

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

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


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