]> git.eshelyaron.com Git - emacs.git/commit
Decode current time directly to timespec
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 11 Jul 2024 13:03:50 +0000 (15:03 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 11 Jul 2024 14:39:52 +0000 (16:39 +0200)
commit33e9c13e5b866618187da29599544f422ba2beca
treea4404b8b0e398aab14e360d70eda8852136d908b
parent2861bbf7c00f1f314def10ef4a000df7131b3ab2
Decode current time directly to timespec

* src/timefns.c (decode_time_components): If FASTER_TIMEFNS, when
returning the current time and the desired form is struct timespec
or time_t, return it directly rather than converting it to struct
ticks_hz and then to struct timespec.  This can avoid some mpz
calculations and/or bignums.

(cherry picked from commit e8b3c4cb58ce6e78b9bcfb9146f0ac6ece0d3055)
src/timefns.c