comparison lisp/net/rcirc.el @ 104795:521d6c4a95a9

(rcirc-keepalive, rcirc-handler-ctcp-KEEPALIVE): Use float-time rather than time-to-seconds.
author Glenn Morris <rgm@gnu.org>
date Wed, 02 Sep 2009 03:20:48 +0000
parents b22ca6941b7b
children bd2966850aac
comparison
equal deleted inserted replaced
104794:84caf35eb99a 104795:521d6c4a95a9
536 (with-rcirc-process-buffer process 536 (with-rcirc-process-buffer process
537 (when (not rcirc-connecting) 537 (when (not rcirc-connecting)
538 (rcirc-send-string process 538 (rcirc-send-string process
539 (format "PRIVMSG %s :\C-aKEEPALIVE %f\C-a" 539 (format "PRIVMSG %s :\C-aKEEPALIVE %f\C-a"
540 rcirc-nick 540 rcirc-nick
541 (time-to-seconds 541 (if (featurep 'xemacs)
542 (current-time))))))) 542 (time-to-seconds
543 (current-time))
544 (float-time)))))))
543 (rcirc-process-list)) 545 (rcirc-process-list))
544 ;; no processes, clean up timer 546 ;; no processes, clean up timer
545 (cancel-timer rcirc-keepalive-timer) 547 (cancel-timer rcirc-keepalive-timer)
546 (setq rcirc-keepalive-timer nil))) 548 (setq rcirc-keepalive-timer nil)))
547 549
548 (defun rcirc-handler-ctcp-KEEPALIVE (process target sender message) 550 (defun rcirc-handler-ctcp-KEEPALIVE (process target sender message)
549 (with-rcirc-process-buffer process 551 (with-rcirc-process-buffer process
550 (setq header-line-format (format "%f" (- (time-to-seconds (current-time)) 552 (setq header-line-format (format "%f" (- (if (featurep 'xemacs)
553 (time-to-seconds
554 (current-time))
555 (float-time))
551 (string-to-number message)))))) 556 (string-to-number message))))))
552 557
553 (defvar rcirc-debug-buffer " *rcirc debug*") 558 (defvar rcirc-debug-buffer " *rcirc debug*")
554 (defvar rcirc-debug-flag nil 559 (defvar rcirc-debug-flag nil
555 "If non-nil, write information to `rcirc-debug-buffer'.") 560 "If non-nil, write information to `rcirc-debug-buffer'.")