make attr, entry, negative_entry cache timeouts runtime configurable

This commit is contained in:
Antonio SJ Musumeci
2019-02-23 01:03:20 -05:00
parent a64c7c97ad
commit 0918dfd117
12 changed files with 253 additions and 31 deletions
+21
View File
@@ -47,6 +47,11 @@ namespace num
tmp *= (1024 * 1024 * 1024);
break;
case 't':
case 'T':
tmp *= (1024ULL * 1024 * 1024 * 1024);
break;
case '\0':
break;
@@ -59,6 +64,22 @@ namespace num
return 0;
}
int
to_double(const std::string &str_,
double *d_)
{
double tmp;
char *endptr;
tmp = strtod(str_.c_str(),&endptr);
if(*endptr != '\0')
return -1;
*d_ = tmp;
return 0;
}
int
to_time_t(const std::string &str,
time_t &value)