scm_c_get_internal_run_time is more precise
* libguile/stime.h (SCM_TIME_UNITS_PER_SECOND): Redefine to point to a C
variable instead of being a pure preprocessor thing. This has the
possibility to break existing compiled C extensions' interpretation of
the internal-time-units-per-second, but hopefully there's no too much
of that code out there, and in the worst case they can just
recompile. Scheme code will get it right without the need to
recompile.
* libguile/stime.c (TIME_UNITS_PER_SECOND): New local define, and
increase to nanosecond resolution if we are on a system in which this
is useful and practical.
(time_from_seconds_and_nanoseconds): New helper.
(get_internal_real_time, get_internal_run_time): New global vars:
function pointers.
(get_internal_real_time_posix_timer):
(get_internal_run_time_posix_timer):
(get_internal_real_time_gettimeofday):
(get_internal_run_time_times):
(get_internal_real_time_fallback): Various implementations.
(scm_get_internal_real_time): Return the get_internal_real_time()
result.
(scm_c_get_internal_run_time): Likewise.
(scm_gettimeofday): No need for a critical section, and remove
obsolete ftime block.
(scm_init_stime): Init all of the new time bases, and decide on
implementations of real time and run time accessors.