Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

stop_watch Class Reference

#include <stop_watch.H>

Inheritance diagram for stop_watch:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 stop_watch ()
bool is_paused () const
double start_time () const
double pause_time () const
double cur_time () const
double elapsed_time () const
void set (double start=sys_time())
void set_elapsed_time (double t=0)
void inc_elapsed_time (double d=0)
void pause ()
void resume ()
void reset_hold ()
void print_time (const char *msg="elapsed time")

Static Public Member Functions

static double sys_time ()

Protected Attributes

double _start_time
double _pause_time
bool _is_paused

Detailed Description

Definition at line 29 of file stop_watch.H.


Constructor & Destructor Documentation

stop_watch::stop_watch  )  [inline]
 

Definition at line 33 of file stop_watch.H.


Member Function Documentation

double stop_watch::cur_time  )  const [inline]
 

Definition at line 51 of file stop_watch.H.

References _is_paused, _pause_time, and sys_time().

Referenced by elapsed_time(), and set_elapsed_time().

double stop_watch::elapsed_time  )  const [inline]
 

Definition at line 55 of file stop_watch.H.

References _start_time, and cur_time().

Referenced by Cam_int_fp::cruise_down(), Cam_int_fp::cruise_zoom_up(), GLUT_MANAGER::do_idle(), XToonTexture::draw(), fit(), BMESH::get_sil_strips(), BMESH::get_zcross_strips(), inc_elapsed_time(), Cam_int_fp::orbit_rot_up(), VIEW::paint(), Recorder::pre_draw_CB(), Animator::pre_draw_CB(), print_time(), Recorder::rec_pause(), egg_timer::remaining(), resume(), FPS::tick(), and Cam_int_fp::up().

void stop_watch::inc_elapsed_time double  d = 0  )  [inline]
 

Definition at line 69 of file stop_watch.H.

References elapsed_time(), and set_elapsed_time().

Referenced by Animator::step().

bool stop_watch::is_paused  )  const [inline]
 

Definition at line 41 of file stop_watch.H.

References _is_paused.

Referenced by Animator::step().

void stop_watch::pause  )  [inline]
 

Definition at line 72 of file stop_watch.H.

References _is_paused, _pause_time, and sys_time().

Referenced by Animator::press_stop(), and reset_hold().

double stop_watch::pause_time  )  const [inline]
 

Definition at line 45 of file stop_watch.H.

References _pause_time.

void stop_watch::print_time const char *  msg = "elapsed time"  )  [inline]
 

Definition at line 100 of file stop_watch.H.

References elapsed_time(), and err_msg().

Referenced by main().

void stop_watch::reset_hold  )  [inline]
 

Definition at line 92 of file stop_watch.H.

References pause(), and set_elapsed_time().

Referenced by Animator::Animator().

void stop_watch::resume  )  [inline]
 

Definition at line 82 of file stop_watch.H.

References _is_paused, elapsed_time(), and set_elapsed_time().

Referenced by Animator::press_play().

void stop_watch::set double  start = sys_time()  )  [inline]
 

Definition at line 61 of file stop_watch.H.

References _start_time.

Referenced by Recorder::activate(), Cam_int_fp::choose(), Cam_int_fp::cruise_down(), Cam_int_fp::cruise_zoom(), GLUT_MANAGER::do_idle(), Cam_int_fp::down(), FPS::FPS(), main(), Cam_int_fp::orbit_rot(), VIEW::paint(), Recorder::rec_pause(), Recorder::rec_play(), Recorder::rec_record(), Recorder::replay(), egg_timer::reset(), FPS::tick(), and CamCruise::travel().

void stop_watch::set_elapsed_time double  t = 0  )  [inline]
 

Definition at line 65 of file stop_watch.H.

References _start_time, and cur_time().

Referenced by inc_elapsed_time(), Animator::press_beginning(), reset_hold(), resume(), and Animator::toggle_activation().

double stop_watch::start_time  )  const [inline]
 

Definition at line 44 of file stop_watch.H.

References _start_time.

static double stop_watch::sys_time  )  [inline, static]
 

Definition at line 38 of file stop_watch.H.

References the_time().

Referenced by GESTURE::add(), GESTURE::age(), cur_time(), VIEW::paint(), and pause().


Member Data Documentation

bool stop_watch::_is_paused [protected]
 

Definition at line 107 of file stop_watch.H.

Referenced by cur_time(), is_paused(), pause(), and resume().

double stop_watch::_pause_time [protected]
 

Definition at line 106 of file stop_watch.H.

Referenced by cur_time(), pause(), and pause_time().

double stop_watch::_start_time [protected]
 

Definition at line 105 of file stop_watch.H.

Referenced by elapsed_time(), set(), set_elapsed_time(), and start_time().


The documentation for this class was generated from the following file:
Generated on Mon Sep 18 11:47:24 2006 for jot by  doxygen 1.4.4