The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
gui2::tdebug_clock::ttime Struct Reference

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

Public Member Functions

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

Public Attributes

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

Detailed Description

Helper struct to keep track of the time.

Definition at line 81 of file debug_clock.hpp.

Constructor & Destructor Documentation

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

Definition at line 171 of file debug_clock.cpp.

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 175 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
millisecondsThe number of milliseconds to move ahead.
Returns
Did the number of seconds alter?

Definition at line 186 of file debug_clock.cpp.

Referenced by gui2::tdebug_clock::update_time().

Member Data Documentation

unsigned gui2::tdebug_clock::ttime::hour

The number of hours.

Definition at line 107 of file debug_clock.hpp.

Referenced by gui2::tdebug_clock::update_time().

unsigned gui2::tdebug_clock::ttime::millisecond

The number of milliseconds.

Definition at line 116 of file debug_clock.hpp.

unsigned gui2::tdebug_clock::ttime::minute

The number of minutes.

Definition at line 110 of file debug_clock.hpp.

Referenced by gui2::tdebug_clock::update_time().

unsigned gui2::tdebug_clock::ttime::second

The number of seconds.

Definition at line 113 of file debug_clock.hpp.

Referenced by gui2::tdebug_clock::update_time().


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