AHK把指定的秒数转换成相应的小时数, 分钟数和秒数 (hh:mm:ss 格式).

AHK把指定的秒数转换成相应的小时数, 分钟数和秒数 (hh:mm:ss 格式).
; 下面的函数把指定的秒数转换成相应的
; 小时数, 分钟数和秒数 (hh:mm:ss 格式).

MsgBox % FormatSeconds(7384)  ; 7384 = 2 小时 + 3 分钟 + 4 秒. 它的结果: 2:03:04

FormatSeconds(NumberOfSeconds)  ; 把指定的秒数转换成 hh:mm:ss 格式.
{
    time = 19990101  ; 任意日期的 *午夜*.
    time += %NumberOfSeconds%, seconds
    FormatTime, mmss, %time%, mm:ss
    return NumberOfSeconds//3600 ":" mmss
    /*
    ; 和上面方法不同的是,这里不支持超过 24 小时的秒数:
    FormatTime, hmmss, %time%, h:mm:ss
    return hmmss
    */
}

 

给TA捐赠
共{{data.count}}人
人已捐赠
其他

AHK改变文件的日期-时间戳

2018-1-8 20:51:32

其他

[搜索]最快的搜索软件Everything

2018-1-8 21:19:27

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索