The Battle for Wesnoth  1.19.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 82 of file debug_clock.hpp.

Constructor & Destructor Documentation

◆ time()

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

Definition at line 126 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 130 of file debug_clock.cpp.

◆ 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 141 of file debug_clock.cpp.

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 108 of file debug_clock.hpp.

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

◆ millisecond

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

The number of milliseconds.

Definition at line 117 of file debug_clock.hpp.

◆ minute

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

The number of minutes.

Definition at line 111 of file debug_clock.hpp.

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

◆ second

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

The number of seconds.

Definition at line 114 of file debug_clock.hpp.

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


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