92 lines
2.7 KiB
C++
92 lines
2.7 KiB
C++
// --------------------------------------------------------------------------------------------------------------------
|
|
/// \file clock.h
|
|
/// \brief File description
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
//
|
|
// vbchaos software design
|
|
//
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
/// $Revision: $
|
|
/// $Author: $
|
|
/// $Date: $
|
|
// (c) 2023 vbchaos
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
#ifndef MAIN_INC_CLOCK_H_
|
|
#define MAIN_INC_CLOCK_H_
|
|
|
|
/**
|
|
* clock implementation
|
|
* \defgroup clock
|
|
* \brief {group_description}
|
|
* \addtogroup {Layer}
|
|
*
|
|
* Detailed description
|
|
* @{
|
|
*/
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
// Include files
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
// CompilerIncludes
|
|
// All include files that are provided by the compiler directly
|
|
#include <string>
|
|
#include <list>
|
|
|
|
|
|
// ProjectIncludes
|
|
// All include files that are provided by the project
|
|
#include "time.h"
|
|
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
// Constant and macro definitions
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
// Type definitions.
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
// Function declarations
|
|
// --------------------------------------------------------------------------------------------------------------------
|
|
|
|
using namespace std;
|
|
|
|
class Clock
|
|
{
|
|
public:
|
|
|
|
|
|
Clock();
|
|
|
|
void generateWordlist(list<string>* wordlist);
|
|
|
|
time_t getTime(void);
|
|
|
|
private:
|
|
time_t currentTime;
|
|
|
|
string toNumbers[20] {"zero", "one", "two", "three", "four",
|
|
"five", "six", "seven", "eight",
|
|
"nine", "ten", "eleven", "twelve",
|
|
"thirteen", "fourteen", "fifteen",
|
|
"sixteen", "seventeen", "eighteen",
|
|
"nineteen"};
|
|
|
|
// void toString(TimeStructure* timestructure);
|
|
int calculateHours(int hour);
|
|
};
|
|
|
|
|
|
/** @} */
|
|
|
|
#endif /* MAIN_INC_CLOCK_H_ */
|