// SPDX-License-Identifier: CC0-1.0
/*
* What compositor/src/imu.c needs of the program it is built into: here,
* Monado's log and clock (c8_glasses.c has the functions).
*/
#ifndef C8_IMU_HOST_H
#define C8_IMU_HOST_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include "util/u_logging.h"
extern enum u_logging_level c8_glasses_log_level;
#define IMU_ERROR U_LOGGING_ERROR
#define IMU_INFO U_LOGGING_INFO
#define IMU_DEBUG U_LOGGING_DEBUG
#define IMU_LOG(level, ...) U_LOG_IFL(level, c8_glasses_log_level, __VA_ARGS__)
#define IMU_LOG_ERRNO(level, fmt, ...) \
U_LOG_IFL(level, c8_glasses_log_level, fmt ": %s", ##__VA_ARGS__, \
strerror(errno))
int64_t c8_now_ms(void);
int64_t c8_now_ns(void);
bool c8_state_path(const char *name, char *path, size_t size, bool make);
#endif