AFLOW
 
Loading...
Searching...
No Matches
aurostd_time.h
Go to the documentation of this file.
1
2#ifndef AUROSTD_TIME_H
3#define AUROSTD_TIME_H
4
5#include <ctime>
6#include <string>
7
8#ifndef uint
9typedef unsigned uint;
10#endif
11
12// ----------------------------------------------------------------------------
13// TIME stuff
14namespace aurostd {
15 int get_day();
16 int get_day(const tm& tstruct); // CO20200624
17 int get_month();
18 int get_month(const tm& tstruct); // CO20200624
19 int get_year();
20 int get_year(const tm& tsruct); // CO20200624
21 void get_offset_utc(int& offset_hours, int& offset_mins); // CO20210601
22 void get_offset_utc(const tm& tstruct, int& offset_hours, int& offset_mins); // CO20210601
23 long int get_date();
24 long int get_date(const tm& tsruct); // CO20200624
25 int get_hour();
26 int get_hour(const tm& tsruct); // CO20200624
27 int get_min();
28 int get_min(const tm& tsruct); // CO20200624
29 int get_sec();
30 int get_sec(const tm& tsruct); // CO20200624
31 long double get_seconds();
32 long double get_seconds(long double reference_seconds);
33 long double get_delta_seconds(long double& seconds_begin);
34 long double get_mseconds();
35 long double get_mseconds(long double reference_useconds);
36 long double get_delta_mseconds(long double& useconds_begin);
37 long double get_useconds();
38 long double get_useconds(long double reference_useconds);
39 long double get_delta_useconds(long double& useconds_begin);
40 std::string get_time();
41 std::string get_time(const tm& tsruct); // CO20200624
42 std::string get_datetime(bool include_utc_offset = false);
43 std::string get_datetime(const tm& tsruct, bool include_utc_offset = false); // CO20200624
44 std::string get_datetime_formatted(const std::string& date_delim = "/", bool include_time = true, const std::string& date_time_sep = " ", const std::string& time_delim = ":"); // CO20171215
45 std::string get_datetime_formatted(const tm& tsruct, const std::string& date_delim = "/", bool include_time = true, const std::string& date_time_sep = " ", const std::string& time_delim = ":"); // CO20171215 //CO20200624
46 bool beep(uint = 2000, uint = 100); // standard values
47} // namespace aurostd
48
49std::string aflow_get_time_string();
50std::string aflow_convert_time_ctime2aurostd(const std::string& time_LOCK); // CO20200624
51std::string aflow_get_time_string_short();
52
53#endif // AUROSTD_TIME_H
unsigned uint
Definition aurostd.h:39
std::string aflow_convert_time_ctime2aurostd(const std::string &time_LOCK)
std::string aflow_get_time_string()
std::string aflow_get_time_string_short()
long double get_delta_useconds(long double &useconds_begin)
int get_hour()
int get_month()
long double get_delta_seconds(long double &seconds_begin)
long double get_useconds()
bool beep(uint freq, uint duration)
int get_day()
long double get_delta_mseconds(long double &useconds_begin)
void get_offset_utc(int &offset_hours, int &offset_mins)
string get_datetime(bool include_utc_offset)
string get_datetime_formatted(const string &date_delim, bool include_time, const string &date_time_sep, const string &time_delim)
int get_sec()
string get_time()
int get_min()
int get_year()
long double get_seconds()
long int get_date()
long double get_mseconds()