ezlib/lib/ez.h

34 lines
627 B
C++

// Includes basic EZLib functions
#include <iostream>
#include <chrono>
using namespace std;
void ezl_hello(int nl) {
if (nl == 1) {
cout << "Hello, from EZLib!\n";
} else {
cout << "Hello, from EZLib!";
}
}
void ezl_info() {
cout << "EZLib v1.0.0"; // NL is disabled by default
}
void ezl_ver(int nl) {
ezl_info();
}
void ezl_time(int nl) {
const auto p1 = std::chrono::system_clock::now();
if (nl == 1) {
cout << chrono::duration_cast<std::chrono::seconds>(
p1.time_since_epoch()).count() << "\n";
} else {
cout << chrono::duration_cast<std::chrono::seconds>(
p1.time_since_epoch()).count();
}
}