当前位置:网站首页>实例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
······
······
······
边栏推荐
- [trio basic tutorial 18 from introduction to proficiency] trio motion controller UDP fast exchange data communication
- The firmware of the connected j-link does not support the following memory access
- Volatile of C language
- Bluetooth hc-05 pairing process and precautions
- Measurement fitting based on Halcon learning [III] PM_ measure_ board. Hdev routine
- On boost circuit
- 动力电池UL2580测试项目包括哪些
- Detailed summary of FIO test hard disk performance parameters and examples (with source code)
- [cloud native | learn kubernetes from scratch] III. kubernetes cluster management tool kubectl
- Sql Server的存儲過程詳解
猜你喜欢
C # joint configuration with Halcon
C, Numerical Recipes in C, solution of linear algebraic equations, LU decomposition source program
Drive LED -- GPIO control
Class of color image processing based on Halcon learning_ ndim_ norm. hdev
[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...)
VESC Benjamin test motor parameters
Tailq of linked list
UEFI development learning 6 - creation of protocol
Measurement fitting based on Halcon learning [II] meaure_ pin. Hdev routine
Let's briefly talk about the chips commonly used in mobile phones - OVP chips
随机推荐
Soem EtherCAT source code analysis II (list of known configuration information)
OC and OD gate circuit
C language # and #
Various types of questions judged by prime numbers within 100 (C language)
What are the test items of power battery ul2580
OLED 0.96 inch test
My-basic application 2: my-basic installation and operation
[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...)
Installation and use of libjpeg and ligpng
MySQL MHA high availability cluster
Explain task scheduling based on Cortex-M3 in detail (Part 1)
Verilog -- state machine coding method
Stablq of linked list
Gradle composite construction
Communication standard -- communication protocol
Semiconductor devices (I) PN junction
Programming knowledge -- assembly knowledge
Measurement fitting based on Halcon learning [III] PM_ measure_ board. Hdev routine
Simple design description of MIC circuit of ECM mobile phone
UE像素流,来颗“减肥药”吧!