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

#include "oct-time.h"

Collaboration diagram for cpu_time:

Public Member Functions

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

Private Member Functions

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

Private Attributes

OCTAVE_TIME_T m_sys_sec
 
long m_sys_usec
 
OCTAVE_TIME_T m_usr_sec
 
long m_usr_usec
 

Friends

class resource_usage
 

Detailed Description

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

Constructor & Destructor Documentation

◆ cpu_time() [1/3]

cpu_time::cpu_time ( void  )
inline

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

References resource_usage::stamp().

◆ cpu_time() [2/3]

cpu_time::cpu_time ( const cpu_time tm)
inline

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

◆ cpu_time() [3/3]

cpu_time::cpu_time ( OCTAVE_TIME_T  usr_sec,
OCTAVE_TIME_T  sys_sec,
long  usr_usec,
long  sys_usec 
)
inlineprivate

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

Member Function Documentation

◆ operator=()

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

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

References m_sys_sec, m_sys_usec, m_usr_sec, and m_usr_usec.

◆ stamp()

void cpu_time::stamp ( void  )

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

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

◆ system()

double cpu_time::system ( void  ) const
inline

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

References as_double().

◆ system_sec()

OCTAVE_TIME_T cpu_time::system_sec ( void  ) const
inline

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

◆ system_usec()

long cpu_time::system_usec ( void  ) const
inline

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

◆ user()

double cpu_time::user ( void  ) const
inline

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

References as_double().

◆ user_sec()

OCTAVE_TIME_T cpu_time::user_sec ( void  ) const
inline

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

◆ user_usec()

long cpu_time::user_usec ( void  ) const
inline

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

Friends And Related Function Documentation

◆ resource_usage

friend class resource_usage
friend

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

Member Data Documentation

◆ m_sys_sec

OCTAVE_TIME_T cpu_time::m_sys_sec
private

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

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

◆ m_sys_usec

long cpu_time::m_sys_usec
private

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

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

◆ m_usr_sec

OCTAVE_TIME_T cpu_time::m_usr_sec
private

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

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

◆ m_usr_usec

long cpu_time::m_usr_usec
private

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

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


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