Initial commit
This commit is contained in:
commit
686dcaf351
68 changed files with 6230 additions and 0 deletions
14
include/get_seconds.h
Normal file
14
include/get_seconds.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#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
|
Reference in a new issue