Commit 8b42d9fb authored by Eric S. Raymond's avatar Eric S. Raymond
Browse files

Make ntpwait in verbose mode report seconds elapsed to fix.

parent 637087c3
Pipeline #10875098 passed with stages
in 13 minutes and 58 seconds
......@@ -155,6 +155,7 @@ if __name__ == "__main__":
# Autoflush stdout
sys.stdout = Unbuffered(sys.stdout)
basetime = time.time()
if verbose:
sys.stdout.write("Waiting for ntpd to synchronize... ")
......@@ -204,7 +205,7 @@ if __name__ == "__main__":
ntp.magic.LEAP_DELSECOND):
# We could check "sync" here to make sure we like the source...
if verbose:
sys.stdout.write("\bOK!\n")
sys.stdout.write("\bOK! (%d seconds)\n" % (time.time() - basetime))
sys.exit(0)
sys.stdout.write("\bUnexpected 'leap' status <%s>\n" % leap)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment