{"id":4395,"date":"2023-11-24T12:07:27","date_gmt":"2023-11-24T12:07:27","guid":{"rendered":"https:\/\/ibex.tech\/python\/?p=4395"},"modified":"2024-01-12T11:30:14","modified_gmt":"2024-01-12T11:30:14","slug":"sleep","status":"publish","type":"post","link":"https:\/\/ibex.tech\/python\/timer-and-timing\/sleep","title":{"rendered":"Sleep"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>import time\n\ntime.sleep(0.5)   #Pause time in seconds<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Delay with console output displaying countdown<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>import time\n\n    wait_time_secs = 2\r\n\r    for i in range(wait_time_secs, 0, -1):\r\n        print(f\"Waiting for result...seconds to go {i:02}\", end='\\r')\r\n        time.sleep(1)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Delay with console output displaying countdown<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[347],"tags":[],"class_list":["post-4395","post","type-post","status-publish","format-standard","hentry","category-timer-and-timing"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/comments?post=4395"}],"version-history":[{"count":3,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4395\/revisions"}],"predecessor-version":[{"id":4603,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/posts\/4395\/revisions\/4603"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/media?parent=4395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/categories?post=4395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/python\/wp-json\/wp\/v2\/tags?post=4395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}