xapian-core  1.4.21
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
CPUTimer Class Reference

#include <cputimer.h>

Public Member Functions

 CPUTimer ()
 Start the timer. More...
 
double get_time () const
 Return elapsed CPU time since object creation in seconds. More...
 

Static Private Member Functions

static double get_current_cputime ()
 

Private Attributes

double start
 

Detailed Description

Definition at line 24 of file cputimer.h.

Constructor & Destructor Documentation

◆ CPUTimer()

CPUTimer::CPUTimer ( )
inline

Start the timer.

Definition at line 31 of file cputimer.h.

Member Function Documentation

◆ get_current_cputime()

double CPUTimer::get_current_cputime ( )
staticprivate

Definition at line 48 of file cputimer.cc.

References errno_to_string(), FAIL_TEST, RealTime::now(), and SKIP_TEST.

Referenced by get_time().

◆ get_time()

double CPUTimer::get_time ( ) const
inline

Return elapsed CPU time since object creation in seconds.

Definition at line 34 of file cputimer.h.

References get_current_cputime(), and start.

Referenced by bigoaddvalue1_helper(), querypairwise1_helper(), and time_query_parse().

Member Data Documentation

◆ start

double CPUTimer::start
private

Definition at line 25 of file cputimer.h.

Referenced by get_time().


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