view include/core/time.h @ 305:91ac90a34003

core/time: remove Duration class, use regular functions instead this class was pretty useless anyway
author Paper <paper@paper.us.eu.org>
date Sun, 19 May 2024 15:56:20 -0400
parents 3ec7804abf17
children da2c5a8ff306
line wrap: on
line source

#ifndef MINORI_CORE_TIME_H_
#define MINORI_CORE_TIME_H_

#include <cstdint>
#include <string>
namespace Time {

/* this is in SECONDS */
using Timestamp = uint64_t;

enum class Units {
	Seconds,
	Minutes
};

std::string GetSecondsAsRelativeString(Timestamp length);
std::string GetSecondsAsAbsoluteString(Units unit_cutoff, Timestamp amount, double unit_in_seconds = 1.0);

int64_t GetSystemTime();

}; // namespace Time

#endif // MINORI_CORE_TIME_H_