6#ifndef FGF_LIB_DEFINES_HPP_H_
7#define FGF_LIB_DEFINES_HPP_H_
11#include <fmt/format.h>
19 std::chrono::time_point<std::chrono::system_clock> now = std::chrono::system_clock::now();
20 auto duration = now.time_since_epoch();
21 auto time_now_ns = std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count();
22 return (time_now_ns / 1e9);
28 inline void Sleep(
const float sleep_time) {
29 std::chrono::duration<double> chrono_sleep_time(sleep_time);
30 std::this_thread::sleep_for(chrono_sleep_time);
Frame Grabber Camera Base Class definitions.
Definition binarySemaphore.hpp:43
void Sleep(const float sleep_time)
Make the calling thread sleep for the given period of time given as seconds.
Definition defines.hpp:28
double Time()
Return time as seconds since epoch with micro second precision.
Definition defines.hpp:18