blob: c2154312018c5eaf2c1ae576da16bbc75bc55a3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <time.h>
#define STR(symbol) #symbol
#define STRINGIFY(symbol) STR(symbol)
#define INA260_SYSFS "/sys/kernel/ina260"
#define INA260_POWER_REGISTER "registers/power"
#define INTERVAL(timestamp,duration)\
((timestamp) - ((timestamp)%(duration)))
#define INTERVAL_LAST(timestamp,duration)\
(INTERVAL(INTERVAL((timestamp),(duration))-1,(duration)))
#define TIMESTAMP() (time(NULL))
|