Progress into understanding time
This commit is contained in:
parent
f73357ee9d
commit
362915a2f3
|
|
@ -14,13 +14,15 @@ int main(int argc, char **argv) {
|
||||||
auto fmt = std::make_shared<MyFormatter>();
|
auto fmt = std::make_shared<MyFormatter>();
|
||||||
app.formatter(fmt);
|
app.formatter(fmt);
|
||||||
|
|
||||||
|
|
||||||
// Define options
|
|
||||||
int p = 0;
|
int p = 0;
|
||||||
app.add_option("-p", p, "Parameter");
|
app.add_option("-p", p, "Parameter");
|
||||||
|
|
||||||
CLI11_PARSE(app, argc, argv);
|
CLI11_PARSE(app, argc, argv);
|
||||||
|
|
||||||
|
[[maybe_unused]] std::time_t result = std::time(nullptr);
|
||||||
|
std::tm time = *std::localtime(&result);
|
||||||
|
std::cout << std::asctime(&time);
|
||||||
|
|
||||||
std::cout << "Parameter value: " << p << std::endl;
|
std::cout << "Parameter value: " << p << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user