Public Member Functions | Public Attributes

gui2::tdebug_clock::ttime Struct Reference

Helper struct to keep track of the time. More...

List of all members.

Public Member Functions

 ttime ()
void set_current_time ()
 Sets the fields to the current time.
bool step (const unsigned milliseconds=30)
 Moves the clock x milliseconds forward.

Public Attributes

unsigned hour
 The number of hours.
unsigned minute
 The number of minutes.
unsigned second
 The number of seconds.
unsigned millisecond
 The number of milliseconds.

Detailed Description

Helper struct to keep track of the time.

Definition at line 79 of file debug_clock.hpp.


Constructor & Destructor Documentation

gui2::tdebug_clock::ttime::ttime (  ) 

Definition at line 154 of file debug_clock.cpp.

References gui2::tcontrol::canvas(), gui2::tdebug_clock::clock_, gui2::twidget::set_dirty(), and gui2::tcanvas::set_variable().

Here is the call graph for this function:


Member Function Documentation

void gui2::tdebug_clock::ttime::set_current_time (  ) 

Sets the fields to the current time.

Note:
The milliseconds aren't queried and set to zero.

Definition at line 162 of file debug_clock.cpp.

bool gui2::tdebug_clock::ttime::step ( const unsigned  milliseconds = 30  ) 

Moves the clock x milliseconds forward.

Note:
The default value of milliseconds is the same as the interval for the drawing routine.
Precondition:
milliseconds < 1000.
Parameters:
milliseconds The number of milliseconds to move ahead.
Returns:
Did the number of seconds alter?

Definition at line 173 of file debug_clock.cpp.

References hour, millisecond, minute, and second.


Member Data Documentation

The number of hours.

Definition at line 105 of file debug_clock.hpp.

Referenced by step().

The number of milliseconds.

Definition at line 114 of file debug_clock.hpp.

Referenced by step().

The number of minutes.

Definition at line 108 of file debug_clock.hpp.

Referenced by step().

The number of seconds.

Definition at line 111 of file debug_clock.hpp.

Referenced by step().


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:21:12 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs