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"))