当前位置:网站首页>实例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
- 亿学学堂给的证券账户安不安全?哪里可以开户
- Tailq of linked list
- C language enhancement -- pointer
- Basic embedded concepts
- Halcon's practice based on shape template matching [2]
- OLED 0.96 inch test
- Programming knowledge -- basis of C language
- After installing the new version of keil5 or upgrading the JLINK firmware, you will always be prompted about the firmware update
- Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
猜你喜欢

1-stm32 operation environment construction

Count the number of inputs (C language)

Step motor generates S-curve upper computer

Hardware and software solution of FPGA key chattering elimination

leetcode - 445. 两数相加 II
![C WinForm [exit application] - practice 3](/img/25/30c795cc3fa6931eb1d733719d4ad0.jpg)
C WinForm [exit application] - practice 3
![[paper reading] the latest transfer ability in deep learning: a survey in 2022](/img/6b/b564fb7a6895329073fb5eaff64340.png)
[paper reading] the latest transfer ability in deep learning: a survey in 2022

The firmware of the connected j-link does not support the following memory access

Talk about the function of magnetic beads in circuits

List of linked lists
随机推荐
Halcon's practice based on shape template matching [1]
Step motor generates S-curve upper computer
Volatile of C language
Sql Server的存儲過程詳解
Drive LED -- GPIO control
Sql Server的存储过程详解
More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
Brief discussion on Buck buck circuit
C language enhancement -- pointer
Measurement fitting based on Halcon learning [i] fuse Hdev routine
Shape template matching based on Halcon learning [VII] reuse_ model. Hdev routine
Soem EtherCAT source code analysis I (data type definition)
Relationship between line voltage and phase voltage, line current and phase current
Imx6ull bare metal development learning 2- use C language to light LED indicator
STM32 --- configuration of external interrupt
How to select conductive slip ring
Network communication model -- Network OSI tcp/ip layering
C WinForm [exit application] - practice 3
Explication de la procédure stockée pour SQL Server
Imx6ull bare metal development learning 1-assembly lit LED