-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.c
More file actions
28 lines (24 loc) · 1.23 KB
/
Copy pathlogger.c
File metadata and controls
28 lines (24 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* logger.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dporhomo <dporhomo@student.42prague.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/06/08 12:01:47 by dporhomo #+# #+# */
/* Updated: 2026/06/14 01:06:14 by dporhomo ### ########.fr */
/* */
/* ************************************************************************** */
/* Prints outputs*/
#include "codexion.h"
void print_status(t_coder *coder, char *status)
{
long long timestamp;
pthread_mutex_lock(&coder->prog->print_lock);
if (read_sim_active(coder->prog))
{
timestamp = get_current_time() - coder->prog->start_time;
printf("%lld %d %s\n", timestamp, coder->id, status);
}
pthread_mutex_unlock(&coder->prog->print_lock);
}