第三十章 方法大全(Python)

文章目录


一、日期

1、time模块

python 复制代码
import time
方法 描述
time.sleep(secs) 程序暂停执行指定的秒数
python 复制代码
'''
time.sleep(secs)
	参数:
		secs:推迟执行的秒数
		
	Delay execution for a given number of seconds.  The argument may be
    a floating point number for subsecond precision.
'''
time.sleep(1)
方法 描述
time.time() 返回当前系统时间的时间戳(从1970年1月1日午夜(UTC/GMT)到当前时间的秒数,是一个浮点数,包括秒数和小数部分,小数部分表示更精确的时间。)
python 复制代码
'''
time.time()
	无参数
	
	Delay execution for a given number of seconds.  The argument may be
    a floating point number for subsecond precision.
'''
start = time.time()
print(start)  # 1720171791.0012453
相关推荐
Scott9999HH7 小时前
【IIoT流量实战】蒸汽管道阀门全关却仍有流量?用 Python 实现涡街信号 FFT 频谱分析与温压全补偿积算网关,深度拆解靠谱的涡街流量计厂家硬核技术标准
开发语言·python
AI云海8 小时前
python 列表、元组、集合和字典
开发语言·python
二十雨辰8 小时前
[爬虫]-Urllib
爬虫·python
玉鸯10 小时前
Agent Hook:在概率推理之上,为 Agent 叠加确定性控制
python·langchain·agent
weixin_4462608511 小时前
HACO:面向动态部署环境的对冲式智能计算可靠多智能体调度框架
后端·python·flask
我的xiaodoujiao11 小时前
API 接口自动化测试详细图文教程学习系列32--Allure测试报告2
python·学习·测试工具·pytest
qetfw11 小时前
MXU:Tauri 2 + React 的 MaaFramework 跨平台 GUI 源码
前端·python·react.js·前端框架·开源项目·效率工具
用户83562907805112 小时前
Python 实现 Excel 页面布局与打印设置自动化
后端·python
一次旅行12 小时前
Python+大模型端到端自动化日报系统
开发语言·python·自动化