The Battle for Wesnoth  1.15.0+dev
Public Member Functions | Public Attributes | List of all members
gui2::dialogs::debug_clock::time Struct Reference

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

Public Member Functions

 time ()
 
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 79 of file debug_clock.hpp.

Constructor & Destructor Documentation

◆ time()

gui2::dialogs::debug_clock::time::time ( )

Definition at line 170 of file debug_clock.cpp.

Member Function Documentation

◆ set_current_time()

void gui2::dialogs::debug_clock::time::set_current_time ( )

Sets the fields to the current time.

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

Definition at line 174 of file debug_clock.cpp.

References hour, millisecond, minute, and second.

◆ step()

bool gui2::dialogs::debug_clock::time::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 185 of file debug_clock.cpp.

References hour, millisecond, minute, and second.

Referenced by gui2::dialogs::debug_clock::update_time().

Member Data Documentation

◆ hour

unsigned gui2::dialogs::debug_clock::time::hour

The number of hours.

Definition at line 105 of file debug_clock.hpp.

Referenced by set_current_time(), step(), and gui2::dialogs::debug_clock::update_time().

◆ millisecond

unsigned gui2::dialogs::debug_clock::time::millisecond

The number of milliseconds.

Definition at line 114 of file debug_clock.hpp.

Referenced by set_current_time(), and step().

◆ minute

unsigned gui2::dialogs::debug_clock::time::minute

The number of minutes.

Definition at line 108 of file debug_clock.hpp.

Referenced by set_current_time(), step(), and gui2::dialogs::debug_clock::update_time().

◆ second

unsigned gui2::dialogs::debug_clock::time::second

The number of seconds.

Definition at line 111 of file debug_clock.hpp.

Referenced by set_current_time(), step(), and gui2::dialogs::debug_clock::update_time().


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