7 int dbstore(uint8_t which, uint32_t val)
14 char *table = (which == 1) ? "coldcnt" : "hotcnt";
17 (void)gmtime_r(&t, &tm);
18 (void)strftime(tstr, sizeof(tstr), "%Y-%m-%d %H:%M:%S", &tm);
19 printf("insert into %s values (\"%s\",%u);\n", table, tstr, val);