Skip to content

Commit b3de7e4

Browse files
committed
Fix measurement of time for timed reports (-Q) to start after DNS name resolution.
1 parent 02feb66 commit b3de7e4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ fping 5.5-rc1 (2025-12-21)
3838
- Fix debug build use of dbg_printf in fping.c (#415, thanks @auerswal)
3939
- Remove MacOS-specific test for -I option (#407)
4040
- GitHub Actions fixes (thanks @gsnw-sebast)
41+
- Fix measurement of time for timed reports (-Q) to start after DNS name
42+
resolution.
4143

4244
fping 5.4 (2025-04-19)
4345
======================

src/fping.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,10 @@ int main(int argc, char **argv)
14341434
#endif
14351435
setlinebuf(stdout);
14361436

1437+
// Last time we updated current_time_ns was before adding the hosts and
1438+
// possibly doing DNS resolution, which means that it isn't accurate
1439+
// anymore.
1440+
update_current_time();
14371441
if (report_interval) {
14381442
next_report_time = current_time_ns + report_interval;
14391443
}

0 commit comments

Comments
 (0)