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

#include "oct-time.h"

Collaboration diagram for octave::sys::cpu_time:

Public Member Functions

 cpu_time (const cpu_time &tm)
 
 cpu_time (void)
 
cpu_timeoperator= (const cpu_time &tm)
 
void stamp (void)
 
double system (void) const
 
time_t system_sec (void) const
 
long system_usec (void) const
 
double user (void) const
 
time_t user_sec (void) const
 
long user_usec (void) const
 

Private Member Functions

 cpu_time (time_t usr_sec, time_t sys_sec, long usr_usec, long sys_usec)
 

Private Attributes

time_t m_sys_sec
 
long m_sys_usec
 
time_t m_usr_sec
 
long m_usr_usec
 

Friends

class resource_usage
 

Detailed Description

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

Constructor & Destructor Documentation

◆ cpu_time() [1/3]

octave::sys::cpu_time::cpu_time ( void  )
inline

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

◆ cpu_time() [2/3]

octave::sys::cpu_time::cpu_time ( const cpu_time tm)
inline

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

◆ cpu_time() [3/3]

octave::sys::cpu_time::cpu_time ( time_t  usr_sec,
time_t  sys_sec,
long  usr_usec,
long  sys_usec 
)
inlineprivate

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

Member Function Documentation

◆ operator=()

cpu_time& octave::sys::cpu_time::operator= ( const cpu_time tm)
inline

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

References m_sys_sec, m_sys_usec, m_usr_sec, and m_usr_usec.

◆ stamp()

void octave::sys::cpu_time::stamp ( void  )

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

References m_sys_sec, m_sys_usec, m_usr_sec, m_usr_usec, and octave_cpu_time().

◆ system()

double octave::sys::cpu_time::system ( void  ) const
inline

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

References as_double().

Referenced by Fcputime().

◆ system_sec()

time_t octave::sys::cpu_time::system_sec ( void  ) const
inline

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

Referenced by Fgetrusage().

◆ system_usec()

long octave::sys::cpu_time::system_usec ( void  ) const
inline

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

Referenced by Fgetrusage().

◆ user()

double octave::sys::cpu_time::user ( void  ) const
inline

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

References as_double().

Referenced by Fcputime().

◆ user_sec()

time_t octave::sys::cpu_time::user_sec ( void  ) const
inline

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

Referenced by Fgetrusage().

◆ user_usec()

long octave::sys::cpu_time::user_usec ( void  ) const
inline

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

Referenced by Fgetrusage().

Friends And Related Function Documentation

◆ resource_usage

friend class resource_usage
friend

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

Member Data Documentation

◆ m_sys_sec

time_t octave::sys::cpu_time::m_sys_sec
private

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

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

◆ m_sys_usec

long octave::sys::cpu_time::m_sys_usec
private

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

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

◆ m_usr_sec

time_t octave::sys::cpu_time::m_usr_sec
private

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

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

◆ m_usr_usec

long octave::sys::cpu_time::m_usr_usec
private

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

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


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