#pragma once

#include <thread>
#include <chrono>

#define SLEEP(x) std::this_thread::sleep_for(std::chrono::seconds(x));

#ifdef _WIN32_

#include <windows.h>


#ifdef OmnimatrixExport
#define Omnimatrix __declspec(dllexport)
#else
#define Omnimatrix __declspec(dllimport)
#endif

#define STRCPY(Dst, Len, Src) strcpy_s(Dst, Len, Src)

#define LOCAL_TIME(in, out) localtime_s(in,out);

#define LOCAL_MIN MIN(a,b)
#define LOCAL_MAX MAX(a,b)

#endif
#ifdef _LINUX_

#include "unistd.h"
#include <stdint.h>


#ifdef Omnimatrix
#define Omnimatrix __attribute__((visibility("default")))
#else
#define Omnimatrix __attribute__((visibility("default")))
#endif

#define LOCAL_TIME(in, out) localtime_r(out,in )

#define STRCPY(Dst,Len ,Src ) strcpy(Dst, Src)

#endif
