New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-D, --timestamp with custom time string eq: %Y-%m-%d %H:%M:%S #310
Comments
We can't change the format, so this would mean adding yet another option (and in general we have too many already). We could possibly add --timestamp-format (without a short-option equivalent), if somebody wants to create a pull request for that. |
If I see this correctly, the one function in |
I did a quick test, a number greater than 255 can be used instead of a character for options that only have a long name:
This works as intended for the long option:
I do not know if this is the way |
My quick solution goes in a similar direction. I use the ASCII number 0 and then look at which long-option is set exactly.
Later in the execution, you must of course check whether "timestamp_flag = 1" and "timestamp_format_flag = 1", because the longoption can also be set without -D. |
Currently the --timestamp output string as following, can we custom it in human readable format eq: %Y-%m-%d %H:%M:%S
fping -D -l 192.168.0.21
[1711612145.46829] 192.168.0.21 : [0], 64 bytes, 27.2 ms (27.2 avg, 0% loss)
[1711612146.48808] 192.168.0.21 : [1], 64 bytes, 46.0 ms (36.6 avg, 0% loss)
[1711612147.46816] 192.168.0.21 : [2], 64 bytes, 26.1 ms (33.1 avg, 0% loss)
The text was updated successfully, but these errors were encountered: