Пример #1
0
static t_el	*elnew(char *name, char *path, t_args args)
{
	t_el			*el;
	struct stat		fstat;

	el = malloc(sizeof(t_el));
	el->name = ft_strdup(name);
	el->path = ft_strjoin(path, name);
	if (lstat(el->path, &fstat) == -1)
	{
		std_error("ft_ls: ", el->name, 1);
		return (NULL);
	}
	el->mode = fstat.st_mode;
	el->nlink = fstat.st_nlink;
	el->uid = fstat.st_uid;
	el->gid = fstat.st_gid;
	el->size = fstat.st_size;
	el->blocks = fstat.st_blocks;
	el->date = (args.u == 1 ? fstat.st_atime : fstat.st_mtime);
	el->rdev = fstat.st_rdev;
	el->next = NULL;
	return (el);
}
Пример #2
0
Файл: time.hpp Проект: noma/ham
	// delta value for the 95% confidence interval
	// (not student's t-test but normal distribution)
	// [average - error, average + error]
	duration conf95_error() const
	{ 
		return 1.96 * std_error();
	}
Пример #3
0
Файл: time.hpp Проект: noma/ham
	// relative error (to repeat measurements until small enough)
	duration relative_std_error() const
	{
		return duration(std_error().count() / average().count());
	}