mirror of
https://github.com/trapexit/mergerfs.git
synced 2024-04-21 12:31:43 +00:00
make attr, entry, negative_entry cache timeouts runtime configurable
This commit is contained in:
+21
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user