time.time()返回一个数字,代表从格林威治时间到现在的秒数

 

time.asctime()不带参数时,以更可读的方式返回时间

time.asctime(x)  带参数时,x是一个元组,x=(2016,5,1,10,30,3,0,0)这一系列数字分别是 年、月、日、时、分、秒、一年中的第几天(这里用0作为一个占位符)、是否是夏令时(0不是,1是)

 

time.localtime(),与time.asctime()不同,localtime把当前时间作为一个对象返回,参数顺序大体与asctime一样,

调用返回对象的内容可以:

time.time() time.asctime()  time.localtime()

两种方式。

time.sleep(x)x是秒,延迟多少秒

相关文章:

  • 2021-09-12
  • 2021-07-13
  • 2022-12-23
  • 2023-03-18
  • 2022-12-23
  • 2021-11-03
  • 2021-11-25
猜你喜欢
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案