当前位置:网站首页>Example 010: time to show
Example 010: time to show
2022-07-05 08:22:00 【Lazy smile】
Topic content
#### example 010: Time to show # ** subject :** Pause output for one second , And format the current time .
Problem analysis
Still use time() function
%Y Year with century as a decimal number. year %m Month as a decimal number [01,12]. month %d Day of the month as a decimal number [01,31]. Japan %H Hour (24-hour clock) as a decimal number [00,23]. when %M Minute as a decimal number [00,59]. branch %S Second as a decimal number [00,61]. second %z Time zone offset from UTC. %a Locale's abbreviated weekday name. %A Locale's full weekday name. %b Locale's abbreviated month name. %B Locale's full month name. %c Locale's appropriate date and time representation. %I Hour (12-hour clock) as a decimal number [01,12]. %p Locale's equivalent of either AM or PM.
Program
import time
for i in range(4):
print(time.strftime('%H:%M:%S', time.localtime(time.time())))
time.sleep(1)
import time
for i in range(4):
print(time.strftime('%H:%M:%S'))
time.sleep(1)
result :
边栏推荐
- 实例010:给人看的时间
- General makefile (I) single C language compilation template
- More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
- 实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
- 亿学学堂给的证券账户安不安全?哪里可以开户
- Stm32--- systick timer
- Bootloader implementation of PIC MCU
- Slist of linked list
- Introduction of air gap, etc
- Hardware and software solution of FPGA key chattering elimination
猜你喜欢
Semiconductor devices (I) PN junction
Wifi-802.11 negotiation rate table
Briefly talk about the identification protocol of mobile port -bc1.2
Several important parameters of LDO circuit design and type selection
After installing the new version of keil5 or upgrading the JLINK firmware, you will always be prompted about the firmware update
Class of color image processing based on Halcon learning_ ndim_ norm. hdev
Management and use of DokuWiki (supplementary)
On boost circuit
VESC Benjamin test motor parameters
Management and use of DokuWiki
随机推荐
Hardware 3 -- function of voltage follower
Negative pressure generation of buck-boost circuit
STM32 outputs 1PPS with adjustable phase
Talk about the function of magnetic beads in circuits
More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
Shell script
剑指 Offer 05. 替换空格
Explain task scheduling based on Cortex-M3 in detail (Part 1)
Some thoughts on extracting perspectives from ealfa and Ebeta
实例002:“个税计算” 企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可提成7.
Brief discussion on Buck buck circuit
Live555 RTSP audio and video streaming summary (II) modify RTSP server streaming URL address
【三层架构及JDBC总结】
C WinForm [help interface - send email] - practice five
Sword finger offer 09 Implementing queues with two stacks
Compilation warning solution sorting in Quartus II
[three tier architecture]
STM32---IIC
List of linked lists
Imx6ull bare metal development learning 1-assembly lit LED