SpringBoot之Duration理解

  • ns for nanoseconds 纳秒 1 second = 1,000,000,000 nanoseconds (ns)。
  • us for microseconds 微妙 1 second = 1,000,000 microseconds (mu s)。
  • ms for milliseconds 毫秒 1 second = 1000 milliseconds (ms)。
  • s for seconds。
  • m for minutes。
  • h for hours。
  • d for days。
Examples:
 "PT20.345S" -- parses as "20.345 seconds"
  "PT15M"     -- parses as "15 minutes" (where a minute is 60 seconds)
  "PT10H"     -- parses as "10 hours" (where an hour is 3600 seconds)
  "P2D"       -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
  "P2DT3H4M"  -- parses as "2 days, 3 hours and 4 minutes"
  "P-6H3M"    -- parses as "-6 hours and +3 minutes"
  "-P6H3M"    -- parses as "-6 hours and -3 minutes"
  "-P-6H+3M"  -- parses as "+6 hours and -3 minutes"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值