Report time with a nanosecond precision where available
authorIvan Maidanski <ivmai@mail.ru>
Mon, 14 Jan 2019 06:52:57 +0000 (09:52 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 14 Jan 2019 06:52:57 +0000 (09:52 +0300)
commitd99e63ecbe1b069193f5b9da7ca44f274d8cebde
treef9b7e39cc7280acdad832fc49f909d89993c2714
parent5561f509d7b345fa873b942f8ea1f835beed3510
Report time with a nanosecond precision where available

Issue #258 (bdwgc).

* alloc.c [!NO_CLOCK] (GC_time_lim_nsec): Update comment.
* alloc.c [!NO_CLOCK && !GC_DISABLE_INCREMENTAL]
(GC_timeout_stop_func): Declare nsec_diff local variable; use
GC_time_lim_nsec.
* alloc.c [!NO_CLOCK && !GC_DISABLE_INCREMENTAL]
(GC_timeout_stop_func): Use NS_FRAC_TIME_DIFF(); print "ns" value after
"ms" one.
* alloc.c [!NO_CLOCK] (GC_try_to_collect_inner, GC_stopped_mark,
GC_finish_collection): Likewise.
* reclaim.c [!NO_CLOCK] (GC_reclaim_all): Likewise.
* include/private/gc_priv.h [!NO_CLOCK && BSD_TIME] (MS_TIME_DIFF):
Always round the result of division toward minus infinity.
* include/private/gc_priv.h [!NO_CLOCK] (NS_FRAC_TIME_DIFF): New macro.
alloc.c
include/private/gc_priv.h
reclaim.c