fix: time mix
This commit is contained in:
parent
69e34424c1
commit
41bd1149d8
2
print.c
2
print.c
@ -11,13 +11,13 @@ static void print(t_data *data, size_t id, char *str)
|
|||||||
size_t time;
|
size_t time;
|
||||||
bool stop;
|
bool stop;
|
||||||
|
|
||||||
time = get_time();
|
|
||||||
pthread_mutex_lock(&data->print_mutex);
|
pthread_mutex_lock(&data->print_mutex);
|
||||||
pthread_mutex_lock(&data->stop_mutex);
|
pthread_mutex_lock(&data->stop_mutex);
|
||||||
stop = data->stop;
|
stop = data->stop;
|
||||||
pthread_mutex_unlock(&data->stop_mutex);
|
pthread_mutex_unlock(&data->stop_mutex);
|
||||||
if (stop == false)
|
if (stop == false)
|
||||||
{
|
{
|
||||||
|
time = get_time();
|
||||||
ft_putnum(time, 7);
|
ft_putnum(time, 7);
|
||||||
ft_putchar(' ');
|
ft_putchar(' ');
|
||||||
ft_putnum(id + 1, 3);
|
ft_putnum(id + 1, 3);
|
||||||
|
Loading…
Reference in New Issue
Block a user