This repository has been archived on 2024-12-30. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2024CG-project-render/include/get_seconds.h
github-classroom[bot] 686dcaf351
Initial commit
2024-11-29 09:50:03 +00:00

14 lines
288 B
C++

#ifndef GET_SECONDS_H
#define GET_SECONDS_H
// Return current epoch time in seconds
double get_seconds();
// Implementation
#include <chrono>
double get_seconds()
{
return
std::chrono::duration<double>(
std::chrono::system_clock::now().time_since_epoch()).count();
}
#endif