Function: encode-time-value

encode-time-value is a byte-compiled function defined in time-date.el.gz.

This function is obsolete since 25.1.

Signature

(encode-time-value HIGH LOW MICRO PICO &optional TYPE)

Documentation

Encode HIGH, LOW, MICRO, and PICO into a time value of type TYPE.

Type 0 is the cons cell (HIGH . LOW), type 1 is the list (HIGH LOW), type 2 is (HIGH LOW MICRO), and type 3 is (HIGH LOW MICRO PICO).

For backward compatibility, if only four arguments are given, it is assumed that PICO was omitted and should be treated as zero.

Probably introduced at or before Emacs version 25.1.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/time-date.el.gz
(defun encode-time-value (high low micro pico &optional type)
  "Encode HIGH, LOW, MICRO, and PICO into a time value of type TYPE.
Type 0 is the cons cell (HIGH . LOW), type 1 is the list (HIGH LOW),
type 2 is (HIGH LOW MICRO), and type 3 is (HIGH LOW MICRO PICO).

For backward compatibility, if only four arguments are given,
it is assumed that PICO was omitted and should be treated as zero."
  (when (null type)
    (setq type pico)
    (setq pico 0))
  (cond
   ((eq type 0) (cons high low))
   ((eq type 1) (list high low))
   ((eq type 2) (list high low micro))
   ((eq type 3) (list high low micro pico))))