The exact error wasn't there, but in another line of the code, exactly here:
void PCunload(int b)
{
time_t t;
tm_ secs;
int hh, mm, ss;
hh=(time(NULL)-n[b].start_time)/3600;
mm=((time(NULL)-n[b].start_time)%3600)/60;
ss=((time(NULL)-n[b].start_time)%3600)%60;
t=time(NULL);
secs=localtime(&t);
n[b].job.priority=-1;
-->>fprintf(f, "\n%d:%d.%d : PC number %d unloaded; elapsed time: %d:%d.%d", secs->tm_hour, secs->tm_min, secs->tm_sec, hh, mm, ss);
}
There I tried to do the conversion inside the printf functions, but something goes wrong... My apologies!