19 lines
1018 B
C
19 lines
1018 B
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: o_ :::::: ::: */
|
|
/* check_alive.c :+: / :+::+: :+: */
|
|
/* +:+ > +:++:+ +:+ */
|
|
/* By: whaffman <whaffman@student.codam.nl> +#+ +:+ +#++#++:++#++ */
|
|
/* +#+ +#+#+ +#++#+ +#+ \o/ */
|
|
/* Created: 2025/01/20 14:26:43 by whaffman #+#+# #+#+# #+# #+# | */
|
|
/* Updated: 2025/01/20 14:27:35 by whaffman ### ### ### ### / \ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "philo.h"
|
|
|
|
int check_death(t_philo *philo)
|
|
{
|
|
return (get_time() - philo->last_meal >= philo->rules->time_to_die);
|
|
}
|