当前位置:网站首页>实例009:暂停一秒输出
实例009:暂停一秒输出
2022-07-05 08:16:00 【懒笑翻】
题目内容
#### 实例009:暂停一秒输出 # **题目:**暂停一秒输出。
问题分析
**使用 time 模块的 sleep() 函数实现暂停。
程序
import time
while True:
# print(time.asctime())
print(time.strftime('%Y-%m-%d %H:%M:%S'))
time.sleep(1)输出结果
2022-07-04 22:06:08
2022-07-04 22:06:09
2022-07-04 22:06:10
2022-07-04 22:06:11
2022-07-04 22:06:12
2022-07-04 22:06:13
2022-07-04 22:06:14
2022-07-04 22:06:15
2022-07-04 22:06:16
2022-07-04 22:06:17
2022-07-04 22:06:18
2022-07-04 22:06:19
2022-07-04 22:06:20
······
······
······
边栏推荐
- [tutorial 15 of trio basic from introduction to proficiency] trio free serial communication
- Communication standard -- communication protocol
- Network port usage
- MHA High available Cluster for MySQL
- Let's briefly talk about the chips commonly used in mobile phones - OVP chips
- Reasons for rapid wear of conductive slip rings
- Solutions to compilation warnings in Quartus II
- Network communication process
- matlab timeserise
- Stablq of linked list
猜你喜欢

Network port usage

C language enhancement -- pointer

H264 (I) i/p/b frame gop/idr/ and other parameters
![[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code](/img/58/576b6b77509ed7a9bef138f3899e37.jpg)
[trio basic tutorial 17 from getting started to mastering] set up and connect the trio motion controller and input the activation code

C language # and #

Several implementation schemes of anti reverse connection protection of positive and negative poles of power supply!

Charge pump boost principle - this article will give you a simple understanding
![C WinForm [display real-time time in the status bar] - practical exercise 1](/img/9f/d193cbb488542cc4c439efd79c4963.jpg)
C WinForm [display real-time time in the status bar] - practical exercise 1
![[tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)](/img/54/2fe86f54af01f10de93818103f2154.jpg)
[tutorial 19 of trio basic from introduction to proficiency] detailed introduction of trio as a slave station connecting to the third-party bus (anybus PROFIBUS DP...)

Compilation warning solution sorting in Quartus II
随机推荐
Imx6ull bare metal development learning 1-assembly lit LED
Connection mode - bridge and net
Management and use of DokuWiki (supplementary)
Semiconductor devices (III) FET
C WinForm [display real-time time in the status bar] - practical exercise 1
Live555 push RTSP audio and video stream summary (III) flower screen problem caused by pushing H264 real-time stream
VESC Benjamin test motor parameters
【云原生 | 从零开始学Kubernetes】三、Kubernetes集群管理工具kubectl
Count the number of inputs (C language)
Measurement fitting based on Halcon learning [i] fuse Hdev routine
99 multiplication table (C language)
Interview catalogue
Verilog -- state machine coding method
Explain task scheduling based on Cortex-M3 in detail (Part 2)
Factors affecting the quality of slip rings in production
Sql Server的存儲過程詳解
MySQL之MHA高可用集群
Makefile application
Halcon's practice based on shape template matching [2]
Weidongshan Internet of things learning lesson 1