/proc/uptime里面的两个数字分别表示:
the uptime of the system (seconds), and the amount of time spent in idle process (seconds).
把第一个数读出来,那就是从系统启动至今的时间,单位是秒
怎么把 秒 转换成 天:小时:分:秒 ,楼主自己应该会吧
[/Quote]
[Quote=引用 6 楼 vikey0623 的回复:]
一楼的高人
我把uptime文件显示出来了,但只有一组数,不大清楚那是什么,可以把她附给一个int 变量,然后在换算吗?
[/Quote]
/proc/uptime里面的两个数字分别表示:
the uptime of the system (seconds), and the amount of time spent in idle process (seconds).
把第一个数读出来,那就是从系统启动至今的时间,单位是秒
怎么把 秒 转换成 天:小时:分:秒 ,楼主自己应该会吧