ezchi / elisp-playground

Place for playing around with elisp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Readme

Functions

sleep-only

This function will only sleep for while to try things like asynchronous or thread.

(defun sleep-only (&optional n)
  "Sleep for N seconds. By default it will sleep 10 seconds."
  (sleep-for (or n 10)))

Try run the sleep-only function

;; (defun sleep-only (&optional n)
;;   "Sleep for N seconds. By default it will sleep 10 seconds."
;;   (sleep-for (or n 10)))

<<sleep-only-func>>

(print (format-time-string "%T"))
(sleep-only 2)
(print (format-time-string "%T"))
(sleep-only 5)
(print (format-time-string "%T"))

About

Place for playing around with elisp


Languages

Language:Emacs Lisp 100.0%