symlinkify: file -> symlink-to-original-file after timeout

This commit is contained in:
Antonio SJ Musumeci 2017-04-24 06:57:29 -04:00
parent 25ce9938c6
commit 6a7675f2bf
13 changed files with 290 additions and 47 deletions

View file

@ -57,4 +57,22 @@ namespace num
return 0;
}
int
to_time_t(const std::string &str,
time_t &value)
{
time_t tmp;
char *endptr;
tmp = strtoll(str.c_str(),&endptr,10);
if(*endptr != '\0')
return -1;
if(tmp < 0)
return -1;
value = tmp;
return 0;
}
}