Skip to content

Commit

Permalink
Add fflush for judging, thanks @wkr21
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 24, 2023
1 parent 26a62a4 commit f849bd6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Homework/ospf/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,6 +1232,8 @@ int main(int argc, char *argv[]) {
if (time > last_time + 5 * 1000) {
// 提示:你可以打印完整的路由表到 stdout/stderr 来帮助调试。
printf("5s Timer\n");
// 清空 stdout 缓冲区,使得评测时能够观察到 OSPF 完成 LSDB 同步的日志
fflush(stdout);

for (int i = 0; i < N_IFACE_ON_BOARD; i++) {
ether_addr mac;
Expand Down

0 comments on commit f849bd6

Please sign in to comment.