kwh-cost/src/main.h

28 lines
458 B
C

#ifndef _MAIN_H_
#define _MAIN_H_
#define VERSION "1.0.0"
typedef long double price_t;
typedef long double wattage_t;
typedef unsigned long interval_t;
typedef struct {
price_t price;
wattage_t wattage;
interval_t interval;
} arguments_t;
arguments_t *parse_arguments(int argc, char **argv);
interval_t to_seconds(char *interval);
inline price_t to_wattpersecond(price_t price);
void print_version();
void print_usage();
#endif