Skip to content

Commit

Permalink
show elapsed time
Browse files Browse the repository at this point in the history
  • Loading branch information
jrockway committed Oct 12, 2008
1 parent cedf514 commit 2150121
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eslide.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
(defconst +eslide-separator+ "^----\n")
(defvar eslide-slide-source nil)
(defvar eslide-current-slide-overlay nil)
(defvar eslide-start-time nil)

(defface eslide-code '((t
(:underline "green" :background "grey20"))) "indented code face")
Expand All @@ -38,6 +39,7 @@
(make-overlay (point-min) (point-min) eslide-slide-source))
(overlay-put eslide-current-slide-overlay 'face '(:background "#040"))
eslide-buffers
(setq eslide-start-time (cadr (current-time)))
(eslide-next))

(define-derived-mode eslide-edit-mode fundamental-mode "ESlide[Edit]"
Expand Down Expand Up @@ -168,6 +170,9 @@
(goto-char (overlay-end eslide-current-slide-overlay))
(ignore-errors (skip-chars-forward "-\n"))))
(eslide-update-current-slide (point)))
(eslide-show-note "time: %s"
(eslide-format-note
(format "%d" (/ (- (cadr (current-time)) eslide-start-time) 60)) 'font-lock-warning-face))
(let ((text (eslide-get-current-slide-text)))
(eslide-show-note "current: %s"
(eslide-format-note text
Expand Down

0 comments on commit 2150121

Please sign in to comment.