aboutsummaryrefslogtreecommitdiffstats
path: root/src/timefns.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Simplify tzfree usePaul Eggert2025-11-041-6/+3
| | | | | | * src/timefns.c (Fdecode_time, Fencode_time) (Fcurrent_time_string): Do not bother to preserve errno around tzfree calls, as Gnulib now does that for us.
* Update from Gnulib by running admin/merge-gnulibPaul Eggert2025-11-041-41/+36
| | | | | | | | | | | | | * admin/merge-gnulib (GNULIB_MODULES): Add stringeq. With current Gnulib it is already present as in indirect dependency; listing it here because Emacs now depends on it directly. * lib-src/ebrowse.c, lib-src/etags.c: (streq): Remove, as Gnulib defines this now. * lib/fseterr.c, lib/fseterr.h, lib/issymlink.c, lib/issymlink.h: * lib/issymlinkat.c, lib/stdio-consolesafe.c, lib/string.c: * m4/fseterr.m4, m4/gettext_h.m4, m4/stringeq.m4: New files from Gnulib. * src/conf_post.h (tzfree) [__ANDROID_API__ >= 35]: Remove.
* Prefer coarse timestamps when using X syncPaul Eggert2025-09-271-0/+20
| | | | | | | | They are good enough for this purpose, and are cheaper to get. * src/timefns.c (monotonic_coarse_timespec): New function. * src/xterm.c [HAVE_XSYNC && !USE_GTK && HAVE_CLOCK_GETTIME]: (x_sync_current_monotonic_time): Use it. (CLOCK_MONOTONIC): Remove; no longer uneeded here.
* Fix DST time calculations on MS-WindowsEli Zaretskii2025-05-261-0/+4
| | | | | | | * src/w32.c (w32_fix_tzset): New function. * src/timefns.c (emacs_localtime_rz, tzlookup): * src/w32.c (sys_localtime): Call 'w32_fix_tzset'. (Bug#11281)
* ; Spelling fix in comment.Paul Eggert2025-02-201-1/+1
|
* Fix set-time-zone-rule on DJGPPPo Lu2025-02-201-0/+24
| | | | | | | | | * lisp/loadup.el ("tooltip"): Load even on MS-DOS. * src/timefns.c (tzvalbuf): Don't define on MS-DOS. (emacs_getenv_TZ, emacs_setenv_TZ) [MSDOS]: Call getenv and putenv rather than overwrite existing environment storage to update DJGPP's environment modification counter.
* Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas2025-02-011-29/+0
|\
| * Unexec removal: Main partPip Cet2024-12-121-29/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: Remove unexec-specific parts. (EMACS_CONFIG_FEATURES): Always report that we do not have the UNEXEC feature. (AC_ECHO): No longer display a line about the unexec feature. * lisp/loadup.el: * lisp/startup.el: Remove unexec-specific code. * src/Makefile.in (base_obj): Drop 'UNEXEC_OBJ'. * src/alloc.c (staticvec): Never initialize this variable. (BLOCK_ALIGN): Always allow large blocks. (mmap_lisp_allowed_p): Remove unexec-specific code. * src/buffer.c (init_buffer): * src/conf_post.h (ADDRESS_SANITIZER): * src/emacs.c (load_pdump, main): Remove unexec-specific code. (Fdump_emacs): Remove function. (syms_of_emacs): Remove 'Fdump_emacs'. * src/lastfile.c: Remove unexec-specific code. * src/lisp.h (gflags): Remove unexec-specific flags. (will_dump_p, will_bootstrap_p, will_dump_with_unexec_p) (dumped_with_unexec_p, definitely_will_not_unexec_p): Remove or adjust predicates. (SUBR_SECTION_ATTRIBUTE): Remove unexec-specific definition. * src/pdumper.c (Fdump_emacs_portable): Remove unexec-specific warning. * src/process.c (init_process_emacs): Remove !unexec condition * src/sysdep.c (maybe_disable_address_randomization): Adjust comment. (init_signals): * src/timefns.c (init_timefns): Remove unexec-specific code. * src/w32heap.c (report_temacs_memory_usage): Remove function. * src/w32heap.h: Adjust comment. * src/w32image.c (globals_of_w32image): Remove unexec-specific code.
* | Fix unlikely time zone abbreviation bugPaul Eggert2025-01-261-9/+18
| | | | | | | | | | | | | | * src/timefns.c (Fcurrent_time_zone): Fix double-"-" bug when time zone name is not known and time zone offset is -3600 or less. Also, stop assuming that make_formatted_string works with "*" precisions; this might ease future changes.
* | Use eabs in Fcurrent_time_zoneStefan Kangas2025-01-131-1/+1
| | | | | | | | | | | | * src/timefns.c (Fcurrent_time_zone): Use eabs. * test/src/timefns-tests.el (timefns-tests-current-time-zone): New test.
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
|/ | | | Run "TZ=UTC0 admin/update-copyright".
* Prefer static_assert to verifyStefan Kangas2024-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although static_assert is C11-specific, and Emacs remains on C99, it has been backported to older compilers by Gnulib. Gnulib has already changed to prefer static_assert, and we can do the same. * lib-src/asset-directory-tool.c (main_2): * src/alloc.c (BLOCK_ALIGN, aligned_alloc, lisp_align_malloc) (vectorlike_nbytes, allocate_pseudovector): * src/android.c (android_globalize_reference, android_set_dashes): * src/android.h: * src/androidfont.c (androidfont_draw, androidfont_text_extents): * src/androidvfs.c: * src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT, bidi_find_bracket_pairs): * src/buffer.c (init_buffer_once): * src/casefiddle.c (do_casify_multibyte_string): * src/dispnew.c (scrolling_window, scrolling): * src/editfns.c (styled_format): * src/emacs-module.c (module_extract_big_integer): * src/fileio.c (Fdo_auto_save): * src/fns.c (next_almost_prime, hash_string): * src/fringe.c (init_fringe): * src/keyboard.h (kbd_buffer_store_event_hold): * src/keymap.c: * src/lisp.h (memclear, reduce_emacs_uint_to_hash_hash, modiff_incr): * src/lread.c (skip_lazy_string): * src/pdumper.c (dump_bignum, Fdump_emacs_portable) (dump_do_dump_relocation, pdumper_load): * src/process.c (make_process, Fmake_process, connect_network_socket): * src/regex-emacs.c: * src/sort.c (tim_sort): * src/sysdep.c (init_random, SSIZE_MAX): * src/thread.c: * src/timefns.c (trillion_factor): * src/unexelf.c: * src/xterm.c (x_send_scroll_bar_event): Prefer static_assert to Gnulib verify. Remove import of verify.h, except when used for other reasons.
* Avoid compiler warningPip Cet2024-08-051-1/+1
| | | | | * src/timefns.c (Fdecode_time): Use 'UNINIT' to avoid a warning with gcc 14 and checking enabled.
* Simplify time form analysisPaul Eggert2024-07-161-129/+54
| | | | | | | | | | | | | | | | This does not change behavior; it merely refactors the code for simplicity. * src/timefns.c (enum timeform, struct form_time): Remove. All uses removed. (decode_time_components): Accept HZ instead of FORM. This saves a switch. All uses changed. (decode_lisp_time): Return union c_time instead of struct form_time. All uses changed. (lisp_time_cform): Remove. All uses changed to just use decode_lisp_time. (time_arith, Ftime_convert): Check (TICKS . HZ) form directly using CONSP, instead of using the old struct form_time. That's fast enough here.
* Test !FASTER_TIMEFNS with builtin resolutionsPaul Eggert2024-07-161-12/+12
| | | | | | | | | | * src/timefns.c (timespec_hz, trillion, ztrillion): If !FASTER_TIMEFNS, do not optimize the calculations of these variables. This gives better test coverage of the slow-path code, when compiling with -DFASTER_TIMEFNS=0. (NEED_ZTRILLION_INIT): Move up, to simplify #ifdefery. Now defined or not defined, instead of being 1 or not defined, since it is used only via #ifdef.
* Make ztrillion staticPaul Eggert2024-07-161-1/+1
| | | | | * src/timefns.c (ztrillion): Now static, when it is a variable, since no other module uses it.
* Further time decoding tidyingMattias Engdegård2024-07-141-124/+100
| | | | | * src/timefns.c (enum timeform): Reorder. (decode_time_components, decode_lisp_time): Simplify and clean up.
* Minor renaming in timefns.cPaul Eggert2024-07-131-3/+15
| | | | | | * src/timefns.c (current_time_in_cform): Rename this static function from current_time_in_form, since this is about enum cform not enum timeform. Use changed.
* Simplify timestamp decodingMattias Engdegård2024-07-131-36/+45
| | | | | | | | * src/timefns.c (current_time_in_form, time_spec_invalid): New. (enum timeform): Remove TIMEFORM_INVALID. (decode_time_components): Move handling of TIMEFORM_INVALID, TIMEFORM_TICKS_HZ and TIMEFORM_NIL... (decode_lisp_time): ...here, avoiding the detour.
* Rename timefns static function lisp_time_structPaul Eggert2024-07-111-7/+7
| | | | | | * src/timefns.c (lisp_time_cform): Rename from lisp_time_struct, since it no longer returns a struct, and now accepts CFORM. All uses changed.
* Avoid mpz for some common timestamp casesPaul Eggert2024-07-111-11/+73
| | | | | | | | | | | | | Performance problem reported by Gerd Möllmann and Mattias Engdegård in: https://lists.gnu.org/r/emacs-devel/2024-06/msg00530.html https://lists.gnu.org/r/emacs-devel/2024-06/msg00539.html * src/timefns.c (CFORM_SECS_ONLY): The exact tv_nsec value is now ignored if nonnegative (i.e., the only thing that matters is that it’s nonnegative). (decode_time_components): Use intmax_t instead of mpz arithmetic if the tick count fits. Add another ‘default: eassume (false);’ so that the revised code pacifies --enable-gcc-warnings with GCC 11.4.0 on x86-64.
* Decode current time directly to timespecPaul Eggert2024-07-111-2/+8
| | | | | | | | * 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.
* In timefns.c avoid by-hand overflow checkingPaul Eggert2024-07-111-49/+27
| | | | | | | | | | | | | Prefer functions like ckd_add to do overflow checking, instead of doing it by hand, to simplify and I hope to make things a bit less error prone. * src/timefns.c (TIME_T_MIN, TIME_T_MAX): Remove. All by-hand overflow checking replaced with calls to ckd_add or ckd_mul. (s_ns_to_timespec): New static function, that uses ckd_add instead of by-hand overflow checking. (ticks_hz_to_timespec): Use it. (check_tm_member): Use mpz_fits_sint_p and mpz_get_si rather than mpz_to_intmax and by-hand overflow checking.
* In timefns, call natnump only for non-fixnumsPaul Eggert2024-07-111-1/+1
| | | | | * src/timefns.c (decode_time_components): Call Fnatnump only for non-fixnums, as we need to special-case 0 anyway.
* In timefns, do gcd reduction more oftenPaul Eggert2024-07-111-5/+8
| | | | | * src/timefns.c (ticks_hz_hz_ticks): Reduce by gcd even if t.ticks is not a fixnum, since that’s easy.
* In timefns, prefer ui mul and divPaul Eggert2024-07-111-4/+9
| | | | | | | | * src/timefns.c (ticks_hz_hz_ticks): If the multiplier is a fixnum that fits in unsigned long, use mpz_mul_ui instead of the more-expensive mpz_mul. Similarly, if the divisor is a fixnum that fits in unsigned long, use mpz_fdiv_q_ui instead of mpz_fdiv_q.
* Reduce size of integer product in timefnsPaul Eggert2024-07-111-5/+25
| | | | | | | | | * src/timefns.c (emacs_gcd): New static function. (ticks_hz_hz_ticks): Use it to reduce the size of the integer product in the common case when converting from ns to ps. For that, we need to multiply t.ticks only by 10³, not multiply by 10¹² and then divide by 10⁹. This avoids the need to use bignums in a significant number of cases.
* Rename timefns internalsPaul Eggert2024-07-111-31/+31
| | | | | | | | | The old names didn’t fit in the conventions used for newer names. * src/timefns.c (struct ticks_hz): Rename from struct lisp_time. (union c_time): Rename lt to th. (ticks_hz_hz_ticks): Rename from lisp_time_hz_ticks. (ticks_hz_seconds): Rename from lisp_time_seconds. All uses changed.
* Speed up decode-time when not doing subsecondsPaul Eggert2024-07-111-8/+23
| | | | | * src/timefns.c (Fdecode_time): Avoid some unnecessary conversions in the common case where subsecond resolution is not required.
* Push some time conversions downPaul Eggert2024-07-111-33/+28
| | | | | | | | | | | | | | | | | * src/timefns.c: Push some time conversions down to lower level fns. This is a win in its own right and should allow for further speedups. (lisp_to_timespec): Remove; this convenience function is no longer needed now that there would be only one caller. Remaining caller changed to use definiens. (enum cform): New constant CFORM_TIMESPEC. Also, CFORM_SECS_ONLY now generates a struct timespec instead of a struct lisp_time. (union c_time.ts): New member. (decode_ticks_hz): Handle new struct timespec cases. (decode_float_time, lisp_time_struct): New arg cform, and return union c_time rather than struct lisp_time. All callers changed. (list4_to_timespec, lisp_time_argument, lisp_seconds_argument): Let lower-level function do the conversion, to allow for better optimization.
* Split lisp_to_timespec in twoPaul Eggert2024-07-111-17/+25
| | | | | | | * src/timefns.c (ticks_hz_to_timespec): New function, which is almost all the old lisp_to_timespec but with a 2-arg API. This should help further changes. (lisp_to_timespec): Use it.
* Refactor decode_ticks_hz via switchPaul Eggert2024-07-111-3/+8
| | | | | * src/timefns.c (decode_ticks_hz): Change ?: to ‘switch’, for benefit of future changes.
* Refactor timefns orderPaul Eggert2024-07-111-200/+200
| | | | | | | Move definitions around in timefns.c. This does not affect the implementation; it merely makes future changes easier to follow. * src/timefns.c (frac_to_double, mpz_time, lisp_to_timespec) (enum cform, union c_time, decode_ticks_hz): Move earlier.
* Refactor timefns more functionallyPaul Eggert2024-07-111-147/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use a more-functional style in timefns.c, rather than passing pointers to objects that are filled in. Although this does not change behavior, it should help future improvements to the code. * src/keyboard.c (decode_timer): Return a possibly-invalid struct timespec instead of storing a timespec into a location specified by an arg, and returning bool. All callers changed. * src/systime.h (struct lisp_time): Move from here to src/timefns.c, since the type is private to timefns.c. * src/timefns.c (decode_float_time, decode_ticks_hz): Return timestamp instead of storing it into a location specified by an arg. All callers changed. (enum cform, union c_time, struct err_time, struct form_time): New types, to aid functional style. (decode_time_components): Return struct err_time instead of returning err and storing timestamp into a location specified by an arg. New arg cform. All callers changed. (decode_lisp_time): Return struct form_time instead of returning form and storing timestamp into a location specified by an arg. New arg cform, replacing decode_secs_only. All callers changed. (list4_to_timespec): Return possibly-invalid timestamp instead of returning a bool and storing timestamp into a location specified by an arg. All callers changed. (lisp_time_struct): Omit no-longer-needed arg PFORM. All callers changed.
* Fix FIXME in commentPaul Eggert2024-06-221-3/+5
| | | | | | * src/timefns.c (decode_float_time): Explain why the code can use large precision here, removing a FIXME by updating the containing comment.
* Remove SYMBOL_WITH_POS_{POS,SYM}Paul Eggert2024-02-131-4/+2
| | | | | | | | | | | | | * src/fns.c (internal_equal): Turn comment into eassert that !symbols_with_pos_enabled. (sxhash_obj): Simplify case of symbol with pos (when enabled). * src/lisp.h (XSYMBOL_WITH_POS_SYM, XSYMBOL_WITH_POS_POS) (maybe_remove_pos_from_symbol): New inline functions. (SYMBOL_WITH_POS_SYM, SYMBOL_WITH_POS_POS): Remove. All uses replaced by the new functions. This avoids some double-checking in the source code, simplifies the code overall, and avoids the need for "Type checking is done in the following macro" comments to explain unusual code.
* Remove BASE2_EQPaul Eggert2024-02-131-3/+3
| | | | | | | * src/lisp.h (lisp_h_BASE2_EQ, BASE2_EQ): Remove. All uses removed. BASE2_EQ was present only for minor optimization and with current gcc -O2, BASE2_EQ does not affect performance, so it’s not worth the hassle.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Prefer C23 ckd_* to Gnulib *_WRAPV macrosPaul Eggert2023-05-171-10/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | C23 has added ckd_add etc. macros with functionality equivalent to the older Gnulib INT_ADD_WRAPV macros, so switch to the more-standard names. * admin/merge-gnulib (GNULIB_MODULES): Add stdckdint. This merely makes the dependency explicit, as we were already using this Gnulib module indirectly. * lib-src/etags.c, src/lisp.h: Include stdckdint.h. * lib-src/etags.c (xnmalloc, xnrealloc): * src/alloc.c (xnmalloc, xnrealloc, xpalloc, Fmake_string) (mark_memory): * src/bignum.c (emacs_mpz_pow_ui): * src/buffer.c (record_overlay_string, overlay_strings): * src/bytecode.c (exec_byte_code): * src/casefiddle.c (do_casify_multibyte_string): * src/ccl.c (ccl_driver, Fccl_execute_on_string): * src/character.c (char_width, c_string_width) (lisp_string_width, count_size_as_multibyte) (string_escape_byte8): * src/cmds.c (internal_self_insert): * src/coding.c (coding_alloc_by_realloc, produce_chars): * src/data.c (arith_driver): * src/dispnew.c (realloc_glyph_pool, init_display_interactive): * src/doprnt.c (parse_format_integer): * src/editfns.c (Freplace_buffer_contents, str2num) (styled_format): * src/emacs-module.c (module_global_reference_p) (module_make_global_ref, module_funcall): * src/eval.c (max_ensure_room): * src/fileio.c (blocks_to_bytes): * src/fns.c (Ffillarray): * src/font.c (font_intern_prop): * src/frame.c (check_frame_pixels): * src/gnutls.c (gnutls_hex_string, gnutls_symmetric_aead): * src/gtkutil.c (get_utf8_string): * src/haikuterm.c (haiku_term_init): * src/image.c (xbm_scan, image_to_emacs_colors) (image_detect_edges, png_load_body): * src/keyboard.c (Frecursion_depth): * src/keymap.c (Flookup_key, Fkey_description): * src/lisp.h (modiff_incr, SAFE_ALLOCA_LISP_EXTRA): * src/lread.c (read_bool_vector): * src/pgtkterm.c (pgtk_term_init): * src/regex-emacs.c (regex_compile): * src/term.c (encode_terminal_code): * src/termcap.c (tputs): * src/textconv.c (textconv_query): * src/timefns.c (timespec_ticks, lisp_time_hz_ticks) (Fdecode_time, check_tm_member): * src/tparam.c (tparam1): * src/w32term.c (w32_initialize_display_info): * src/xdisp.c (fill_column_indicator_column, decode_mode_spec): * src/xselect.c (selection_data_size, x_property_data_to_lisp): * src/xsmfns.c (smc_save_yourself_CB): * src/xterm.c (xm_setup_dnd_targets, x_sync_get_monotonic_time) (x_sync_current_monotonic_time, x_sync_note_frame_times) (x_display_set_last_user_time, x_term_init): Prefer the C23 stdckdint macros to their Gnulib intprops.h counterparts, since C23 is standard.
* Fix system time sampling on MS-WindowsEli Zaretskii2023-03-241-0/+9
| | | | | | * src/timefns.c (emacs_localtime_rz) [WINDOWSNT]: Unconditionally call tzset to make sure we pick up all the changes of time zone, working around the MS CRT caching.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* ; Avoid compilation warning on MS-WindowsEli Zaretskii2022-12-121-0/+4
| | | | | * src/timefns.c (sys_clock): Declare, to avoid compilation warning.
* Work around lsp-mode compatibility bugPaul Eggert2022-11-241-1/+1
| | | | | * src/timefns.c (Ftime_subtract): Respect current-time-list when args are eq (Bug#59506).
* Improve timefns speed on integersPaul Eggert2022-08-141-4/+15
| | | | | | * src/timefns.c (decode_lisp_time) [FASTER_TIMEFNS]: Speed up when SPECIFIED_TIME is an integer. (time_cmp) [FASTER_TIMEFNS]: Speed up when comparing integers.
* Decode time conses before floatsPaul Eggert2022-08-141-11/+11
| | | | | * src/timefns.c (decode_lisp_time): Test for conses before floats, as conses are more common.
* * lisp/calendar/time-date.el (seconds-to-time): Use the original arg listStefan Monnier2022-08-141-3/+10
|
* Document time-convert FORM argument as mandatoryBasil L. Contovounesios2022-08-131-3/+2
| | | | | | | | | This is a followup to commit b70369c557 of 2022-08-05 "time-convert): Deprecate calls without an explicit FORM arg". * doc/lispref/os.texi (Time Conversion): * src/timefns.c (Ftime_convert): Describe FORM argument as required as per the advertised calling convention.
* Improve time-convert docstring formatting for readabilityStefan Kangas2022-08-131-6/+12
| | | | | * src/timefns.c (Ftime_convert): Doc fix; improve formatting for readability.