diff options
author | Hasso Tepper <hasso.tepper@gmail.com> | 2012-10-11 11:19:51 +0000 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2012-11-05 15:16:53 -0500 |
commit | 43057bf22a4240b5e163c30a1f66deb702ce746e (patch) | |
tree | d5b4d164efa3034ae8006020d6d1ae5e314a867c /isisd | |
parent | 8c9ed279852393804c26e3c8c556a13d08654907 (diff) |
isisd: clock_gettime() -> quagga_gettime() conversion.
* isisd/isis_spf.c: Use portable quagga_gettime() like the rest of
the Quagga code.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'isisd')
-rw-r--r-- | isisd/isis_spf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index eff7c476..07b855b4 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -1180,13 +1180,13 @@ isis_run_spf (struct isis_area *area, int level, int family, u_char *sysid) u_char lsp_id[ISIS_SYS_ID_LEN + 2]; struct isis_lsp *lsp; struct route_table *table = NULL; - struct timespec time_now; + struct timeval time_now; unsigned long long start_time, end_time; /* Get time that can't roll backwards. */ - clock_gettime(CLOCK_MONOTONIC, &time_now); + quagga_gettime(QUAGGA_CLK_MONOTONIC, &time_now); start_time = time_now.tv_sec; - start_time = (start_time * 1000000) + (time_now.tv_nsec / 1000); + start_time = (start_time * 1000000) + time_now.tv_usec; if (family == AF_INET) spftree = area->spftree[level - 1]; @@ -1282,9 +1282,9 @@ out: spftree->pending = 0; spftree->runcount++; spftree->last_run_timestamp = time (NULL); - clock_gettime(CLOCK_MONOTONIC, &time_now); + quagga_gettime(QUAGGA_CLK_MONOTONIC, &time_now); end_time = time_now.tv_sec; - end_time = (end_time * 1000000) + (time_now.tv_nsec / 1000); + end_time = (end_time * 1000000) + time_now.tv_usec; spftree->last_run_duration = end_time - start_time; |