tgrekov-philosophers
HIVE philosophers July 2024
Loading...
Searching...
No Matches
philo_sleep.c File Reference

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* philo_sleep.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tgrekov <tgrekov@student.hive.fi> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/23 04:54:29 by tgrekov #+# #+# */
/* Updated: 2024/07/27 08:33:02 by tgrekov ### ########.fr */
/* */
/* ************************************************************************** */

Definition in file philo_sleep.c.

#include <unistd.h>
#include "../utils/utils.h"
#include "philo.h"
Include dependency graph for philo_sleep.c:

Go to the source code of this file.

Functions

int philo_sleep (unsigned long ms, t_thread *thread)
 Sleep in 200 microsecond intervals until ms millis have elapsed, or stop has returned non-zero.
 

Function Documentation

◆ philo_sleep()

int philo_sleep ( unsigned long  ms,
t_thread thread 
)

Sleep in 200 microsecond intervals until ms millis have elapsed, or stop has returned non-zero.

Parameters
msMilliseconds to sleep
thread
Return values
int

Definition at line 33 of file philo_sleep.c.

References check_end(), stop(), and timestamp().

Here is the call graph for this function:
Here is the caller graph for this function: