I wanted to fire up a function every hour to get the weather from the
web. I first tried `run-at-time' but could not get it to accept any
time specifications. e.g. (run-at-time "11:23pm" 3600 'test-func)
I then switched to an itimer and found what I believe is an inconsistency
with decode/encode-time.
`decode-time' produces a list of three (3) integers but `encode-time'
only produces a list of two (2) integers. Is this the correct
behavior? It makes it hard to use `itimer-time-difference'.
Example:
(let* ((now (current-time))
(time (decode-time now))
(go (encode-time
0
10
(1+ (car (cdr (cdr time))))
(car (cdr (cdr (cdr time))))
(car (cdr (cdr (cdr (cdr time)))))
(car (cdr (cdr (cdr (cdr (cdr time))))))
)))
(itimer-time-difference go now)
;; fails:
;; Wrong type argument: number-char-or-marker-p, nil
I believe the first problem is related to the second since timer.el
uses encode/decode-time and also returns `Wrong type argument:
number-char-or-marker-p, nil'.
Hope this mumble makes sense to someone.
Sean
--
Sean MacLennan Just crank that volume to the point of pain.
Ottawa, Canada Why waste good music on a brain?
http://www.ncf.carleton.ca/~bn932 (Spinal Tap)