当前位置:网站首页>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 :
边栏推荐
- C WinForm [get file path -- traverse folder pictures] - practical exercise 6
- Installation and use of libjpeg and ligpng
- Weidongshan Internet of things learning lesson 1
- 实例010:给人看的时间
- Circleq of linked list
- More than 90% of hardware engineers will encounter problems when MOS tubes are burned out!
- NTC thermistor application - temperature measurement
- STM32---IIC
- 实例001:数字组合 有四个数字:1、2、3、4,能组成多少个互不相同且无重复数字的三位数?各是多少?
- Adaptive filter
猜你喜欢
Some thoughts on extracting perspectives from ealfa and Ebeta
Halcon's practice based on shape template matching [2]
Relationship between line voltage and phase voltage, line current and phase current
STM32 tutorial triple ADC interleaved sampling
[trio basic from introduction to mastery tutorial XIV] trio realizes unit axis multi-color code capture
Shape template matching based on Halcon learning [viii] PM_ multiple_ models. Hdev routine
Bluebridge cup internet of things basic graphic tutorial - GPIO output control LD5 on and off
Briefly talk about the identification protocol of mobile port -bc1.2
实例007:copy 将一个列表的数据复制到另一个列表中。
Stm32--- systick timer
随机推荐
Explain task scheduling based on Cortex-M3 in detail (Part 1)
Soem EtherCAT source code analysis II (list of known configuration information)
Buildroot system for making raspberry pie cm3
Sword finger offer 09 Implementing queues with two stacks
MySQL MHA high availability cluster
Talk about the function of magnetic beads in circuits
STM32 --- serial port communication
Imx6ull bare metal development learning 2- use C language to light LED indicator
Array integration initialization (C language)
STM32 outputs 1PPS with adjustable phase
Explication de la procédure stockée pour SQL Server
STM32 single chip microcomputer -- debug in keil5 cannot enter the main function
Hardware and software solution of FPGA key chattering elimination
MySQL之MHA高可用集群
Summary -st2.0 Hall angle estimation
[NAS1](2021CVPR)AttentiveNAS: Improving Neural Architecture Search via Attentive Sampling (未完)
Briefly talk about the identification protocol of mobile port -bc1.2
STM32 summary (HAL Library) - DHT11 temperature sensor (intelligent safety assisted driving system)
關於線性穩壓器的五個設計細節
Classic application of MOS transistor circuit design (2) - switch circuit design