FREQUENCY
static int freq = FREQUENCY;
freq = FREQUENCY;
#define PERIOD max_t(u64, 10000, NSEC_PER_SEC / FREQUENCY)