Rename files
This commit is contained in:
38
cli/main.cpp
38
cli/main.cpp
@@ -1,22 +1,26 @@
|
||||
#include "camellya.h"
|
||||
#include <iostream>
|
||||
#include <format>
|
||||
#include <chrono>
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
if(argc < 2){
|
||||
std::cout << std::format("Usage: chun <script> \n") << std::endl;
|
||||
return 0;
|
||||
}
|
||||
std::chrono::high_resolution_clock::time_point start = std::chrono::high_resolution_clock::now();
|
||||
camellya::State state;
|
||||
bool success = state.do_file(argv[1]);
|
||||
if (!success) {
|
||||
std::cerr << "Error: " << state.get_error() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
std::chrono::high_resolution_clock::time_point end = std::chrono::high_resolution_clock::now();
|
||||
std::chrono::duration<double> duration = end - start;
|
||||
std::cout << std::format("Execution completed in {} seconds. \n", duration.count()) << std::endl;
|
||||
int main(int argc, char **argv) {
|
||||
if (argc < 2) {
|
||||
std::cout << std::format("Usage: chun <script> \n") << std::endl;
|
||||
return 0;
|
||||
}
|
||||
std::chrono::high_resolution_clock::time_point start =
|
||||
std::chrono::high_resolution_clock::now();
|
||||
camellya::Camellya c;
|
||||
bool success = c.do_file(argv[1]);
|
||||
if (!success) {
|
||||
std::cerr << "Error: " << c.get_error() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
std::chrono::high_resolution_clock::time_point end =
|
||||
std::chrono::high_resolution_clock::now();
|
||||
std::chrono::duration<double> duration = end - start;
|
||||
std::cout << std::format("Execution completed in {} seconds. \n",
|
||||
duration.count())
|
||||
<< std::endl;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user