diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2017-01-09 15:26:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09 15:26:16 +0100 |
commit | b98f56422e692217bb149aaa78fda77e07097658 (patch) | |
tree | caf2fbb14b55fde42dfc2481b45c5394340070ba | |
parent | Merge pull request #56 from qlyoung/if-metric (diff) | |
parent | bgpd: Remove knowledge of HAVE_CLOCK_MONTONIC (diff) | |
download | frr-b98f56422e692217bb149aaa78fda77e07097658.tar.xz frr-b98f56422e692217bb149aaa78fda77e07097658.zip |
Merge pull request #55 from donaldsharp/monotonic
Monotonic
-rw-r--r-- | bgpd/bgp_dump.c | 4 | ||||
-rw-r--r-- | bgpd/bgp_nexthop.c | 4 | ||||
-rw-r--r-- | bgpd/bgp_route.c | 14 | ||||
-rw-r--r-- | bgpd/bgpd.h | 4 | ||||
-rw-r--r-- | pimd/pim_main.c | 6 |
5 files changed, 0 insertions, 32 deletions
diff --git a/bgpd/bgp_dump.c b/bgpd/bgp_dump.c index add653193..8dd753d27 100644 --- a/bgpd/bgp_dump.c +++ b/bgpd/bgp_dump.c @@ -364,11 +364,7 @@ bgp_dump_route_node_record (int afi, struct bgp_node *rn, stream_putw (obuf, info->peer->table_dump_index); /* Originated */ -#ifdef HAVE_CLOCK_MONOTONIC stream_putl (obuf, time(NULL) - (bgp_clock() - info->uptime)); -#else - stream_putl (obuf, info->uptime); -#endif /* HAVE_CLOCK_MONOTONIC */ /* Dump attribute. */ /* Skip prefix & AFI/SAFI for MP_NLRI */ diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 0a72d0922..2cbcc37d6 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -450,12 +450,8 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail) if (CHECK_FLAG(bnc->flags, BGP_NEXTHOP_CONNECTED)) vty_out (vty, " Must be Connected%s", VTY_NEWLINE); } -#ifdef HAVE_CLOCK_MONOTONIC tbuf = time(NULL) - (bgp_clock() - bnc->last_update); vty_out (vty, " Last update: %s", ctime(&tbuf)); -#else - vty_out (vty, " Last update: %s", ctime(&bnc->uptime)); -#endif /* HAVE_CLOCK_MONOTONIC */ vty_out(vty, "%s", VTY_NEWLINE); } } diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 0df3a0c80..6d8f721bf 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -6557,9 +6557,7 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p, char buf1[BUFSIZ]; struct attr *attr; int sockunion_vty_out (struct vty *, union sockunion *); -#ifdef HAVE_CLOCK_MONOTONIC time_t tbuf; -#endif json_object *json_bestpath = NULL; json_object *json_cluster_list = NULL; json_object *json_cluster_list_list = NULL; @@ -7184,7 +7182,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p, } /* Line 8 display Uptime */ -#ifdef HAVE_CLOCK_MONOTONIC tbuf = time(NULL) - (bgp_clock() - binfo->uptime); if (json_paths) { @@ -7195,17 +7192,6 @@ route_vty_out_detail (struct vty *vty, struct bgp *bgp, struct prefix *p, } else vty_out (vty, " Last update: %s", ctime(&tbuf)); -#else - if (json_paths) - { - json_last_update = json_object_new_object(); - json_object_int_add(json_last_update, "epoch", tbuf); - json_object_string_add(json_last_update, "string", ctime(&binfo->uptime)); - json_object_object_add(json_path, "lastUpdate", json_last_update); - } - else - vty_out (vty, " Last update: %s", ctime(&binfo->uptime)); -#endif /* HAVE_CLOCK_MONOTONIC */ } /* We've constructed the json object for this path, add it to the json diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h index b82cf9dde..76e19ac53 100644 --- a/bgpd/bgpd.h +++ b/bgpd/bgpd.h @@ -1459,13 +1459,9 @@ peer_group_af_configured (struct peer_group *group) static inline char * timestamp_string (time_t ts) { -#ifdef HAVE_CLOCK_MONOTONIC time_t tbuf; tbuf = time(NULL) - (bgp_clock() - ts); return ctime(&tbuf); -#else - return ctime(&ts); -#endif /* HAVE_CLOCK_MONOTONIC */ } static inline int diff --git a/pimd/pim_main.c b/pimd/pim_main.c index 29432ea23..ed8f69b51 100644 --- a/pimd/pim_main.c +++ b/pimd/pim_main.c @@ -270,12 +270,6 @@ int main(int argc, char** argv, char** envp) { zlog_notice("PIM_UNEXPECTED_KERNEL_UPCALL: report unexpected kernel upcall"); #endif -#ifdef HAVE_CLOCK_MONOTONIC - zlog_notice("HAVE_CLOCK_MONOTONIC"); -#else - zlog_notice("!HAVE_CLOCK_MONOTONIC"); -#endif - while (thread_fetch(master, &thread)) thread_call(&thread); |