{"id":1040,"date":"2017-04-30T11:26:01","date_gmt":"2017-04-30T02:26:01","guid":{"rendered":"http:\/\/www.python.ambitious-engineer.com\/?p=1040"},"modified":"2017-05-01T23:45:29","modified_gmt":"2017-05-01T14:45:29","slug":"%e3%82%b9%e3%83%aa%e3%83%bc%e3%83%97%e3%81%99%e3%82%8b-time-sleep","status":"publish","type":"post","link":"https:\/\/www.python.ambitious-engineer.com\/archives\/1040","title":{"rendered":"\u30b9\u30ea\u30fc\u30d7\u3059\u308b time.sleep"},"content":{"rendered":"<p>\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u30a4\u30f3\u30bf\u30fc\u30d0\u30eb\u3092\u53d6\u308b\u7b49\u3001\u5b9f\u884c\u4e2d\u306e\u51e6\u7406\u3092\u4e00\u6642\u7684\u306b\u30b9\u30ea\u30fc\u30d7\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u524d\u3054\u7d39\u4ecb\u3057\u305f\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u306e<a href=\"http:\/\/www.python.ambitious-engineer.com\/archives\/473#time\">time<\/a>\u306b\u306f\u3001\u6642\u523b\u30c7\u30fc\u30bf\u3078\u306e\u30a2\u30af\u30bb\u30b9\u4ee5\u5916\u306b\u30b9\u30ea\u30fc\u30d7\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport time\r\n\r\nprint('\u51e6\u7406\u958b\u59cb')\r\n\r\ntime.sleep(1.5) # 1.5\u79d2\u30b9\u30ea\u30fc\u30d7\u3059\u308b\r\n\r\nprint('\u51e6\u7406\u7d42\u4e86')\r\n<\/pre>\n<p>\u5f15\u6570\u306b\u79d2\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5c0f\u6570\u70b9\u306e\u6307\u5b9a\u3082\u3067\u304d\u308b\u305f\u3081\u3001\u7d30\u304b\u3044\u8a2d\u5b9a\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>process_time\u3068\u4f75\u7528\u3059\u308b\u969b\u306e\u6ce8\u610f<\/h2>\n<p>\u30b9\u30ea\u30fc\u30d7\u306e\u6319\u52d5\u3067\u6ce8\u610f\u304c\u5fc5\u8981\u306a\u306e\u304c\u3001\u540c\u3058time\u30e2\u30b8\u30e5\u30fc\u30eb\u306b\u542b\u307e\u308c\u308bprocess_time\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u73fe\u5728\u306e\u30d7\u30ed\u30bb\u30b9\u306eCPU\u4f7f\u7528\u6642\u9593\u306e\u5408\u8a08\u3092\u8fd4\u3057\u307e\u3059\u304c\u3001sleep\u3092\u5b9f\u884c\u3057\u305f\u6642\u9593\u306f\u542b\u307e\u308c\u307e\u305b\u3093\u3002<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nimport time\r\n\r\nprint('\u51e6\u7406\u958b\u59cb')\r\n\r\ntime.sleep(1.5) # 1.5\u79d2\u30b9\u30ea\u30fc\u30d7\u3059\u308b\r\n\r\nprint('\u51e6\u7406\u7d42\u4e86')\r\n\r\nprint(time.process_time()) # 1.5\u3088\u308a\u5c0f\u3055\u3044\u5024\u304c\u8868\u793a\u3055\u308c\u308b\r\n\r\n<\/pre>\n<p>\u51e6\u7406\u6642\u9593\u3088\u308a\u306f\u308b\u304b\u306b\u77ed\u3044\u5024\u304c\u51fa\u529b\u3055\u308c\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3067\u30a4\u30f3\u30bf\u30fc\u30d0\u30eb\u3092\u53d6\u308b\u7b49\u3001\u5b9f\u884c\u4e2d\u306e\u51e6\u7406\u3092\u4e00\u6642\u7684\u306b\u30b9\u30ea\u30fc\u30d7\u3057\u305f\u3044\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u4ee5\u524d\u3054\u7d39\u4ecb\u3057\u305f\u6a19\u6e96\u30e2\u30b8\u30e5\u30fc\u30eb\u306etime\u306b\u306f\u3001\u6642\u523b\u30c7\u30fc\u30bf\u3078\u306e\u30a2\u30af\u30bb\u30b9\u4ee5\u5916\u306b\u30b9\u30ea\u30fc\u30d7\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\u3002 \u5f15\u6570\u306b\u79d2\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u5c0f\u6570\u70b9\u306e\u6307...<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[13],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1040"}],"collection":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/comments?post=1040"}],"version-history":[{"count":4,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1040\/revisions"}],"predecessor-version":[{"id":1051,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/posts\/1040\/revisions\/1051"}],"wp:attachment":[{"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/media?parent=1040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/categories?post=1040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.python.ambitious-engineer.com\/wp-json\/wp\/v2\/tags?post=1040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}