diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-06-13 16:52:21 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2017-12-07 13:49:27 +0100 |
commit | d3fa9e84e98d7b8c726f5e35d6a359971eb98f94 (patch) | |
tree | 686c3291ab9833972c06834f63e742272e904c0e /proto/ospf/neighbor.c | |
parent | 212eda07c4e481e3341ede37b0877fa22bc042a4 (diff) |
Timers: Show sub-second times in some protocol outputs
Diffstat (limited to 'proto/ospf/neighbor.c')
-rw-r--r-- | proto/ospf/neighbor.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/proto/ospf/neighbor.c b/proto/ospf/neighbor.c index 64165e46..74ea63d0 100644 --- a/proto/ospf/neighbor.c +++ b/proto/ospf/neighbor.c @@ -651,20 +651,6 @@ ospf_sh_neigh_info(struct ospf_neighbor *n) { struct ospf_iface *ifa = n->ifa; char *pos = "PtP "; - char etime[6]; - int exp, sec, min; - - exp = tm_remains(n->inactim); - sec = exp % 60; - min = exp / 60; - if (min > 59) - { - bsprintf(etime, "-Inf-"); - } - else - { - bsprintf(etime, "%02u:%02u", min, sec); - } if ((ifa->type == OSPF_IT_BCAST) || (ifa->type == OSPF_IT_NBMA)) { @@ -676,6 +662,7 @@ ospf_sh_neigh_info(struct ospf_neighbor *n) pos = "Other"; } - cli_msg(-1013, "%-1R\t%3u\t%s/%s\t%-5s\t%-10s %-1I", n->rid, n->priority, - ospf_ns_names[n->state], pos, etime, ifa->ifname, n->ip); + cli_msg(-1013, "%-1R\t%3u\t%s/%s\t%7t\t%-10s %-1I", + n->rid, n->priority, ospf_ns_names[n->state], pos, + tm2_remains(n->inactim), ifa->ifname, n->ip); } |