127,7 → 127,7 |
fprintf(file_event_header,"};\n\n"); |
|
fprintf(file_event_header,"int total_loader_contract = %d;\n\n",total_contract_number); |
|
|
fclose(file_event_header); |
|
return 0; |
134,6 → 134,23 |
|
} |
|
int write_simulation_time(struct timespec *total) |
{ |
|
FILE *file_event_header; |
|
file_event_header = fopen(EVENT_DEFINE,"a+"); |
if (file_event_header == NULL) return 1; |
|
fprintf(file_event_header,"struct timespec total_time = {%d,%d};\n\n",total->tv_sec,total->tv_nsec); |
|
fclose(file_event_header); |
|
return 0; |
|
|
} |
|
int write_single_act(struct timespec *t, struct loader_task *c) |
{ |
|
387,6 → 404,8 |
|
close_loader_contract(total_contract_number); |
|
write_simulation_time(&total_time); |
|
return 0; |
|
} |