TRF Language Model
wb::Clock Class Reference

clock - used to record the time More...

#include <wb-win.h>

Public Member Functions

 Clock (void)
 
 ~Clock (void)
 
void Clean ()
 clean the clock More...
 
clock_t Begin ()
 begin to record More...
 
clock_t End ()
 record end and return the time More...
 
clock_t Get ()
 get the time, but don't stop recording More...
 
void Sleep (clock_t n)
 wait for sveral millissecond More...
 

Static Public Member Functions

static double ToSecond (clock_t t)
 transform the clock_t to second More...
 

Protected Attributes

clock_t m_nBeginTime
 
clock_t m_nEndTime
 
bool m_bWork
 

Detailed Description

clock - used to record the time

Author
WangBin
Date
2016-04-28

Definition at line 95 of file wb-win.h.

Constructor & Destructor Documentation

§ Clock()

wb::Clock::Clock ( void  )

Definition at line 118 of file wb-win.cpp.

§ ~Clock()

wb::Clock::~Clock ( void  )

Definition at line 125 of file wb-win.cpp.

Member Function Documentation

§ Begin()

clock_t wb::Clock::Begin ( )

begin to record

Definition at line 138 of file wb-win.cpp.

§ Clean()

void wb::Clock::Clean ( )

clean the clock

Definition at line 132 of file wb-win.cpp.

§ End()

clock_t wb::Clock::End ( )

record end and return the time

Definition at line 143 of file wb-win.cpp.

§ Get()

clock_t wb::Clock::Get ( )

get the time, but don't stop recording

Definition at line 151 of file wb-win.cpp.

§ Sleep()

void wb::Clock::Sleep ( clock_t  n)

wait for sveral millissecond

Definition at line 155 of file wb-win.cpp.

§ ToSecond()

static double wb::Clock::ToSecond ( clock_t  t)
inlinestatic

transform the clock_t to second

Definition at line 115 of file wb-win.h.

Member Data Documentation

§ m_bWork

bool wb::Clock::m_bWork
protected

Definition at line 100 of file wb-win.h.

§ m_nBeginTime

clock_t wb::Clock::m_nBeginTime
protected

Definition at line 98 of file wb-win.h.

§ m_nEndTime

clock_t wb::Clock::m_nEndTime
protected

Definition at line 99 of file wb-win.h.


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