Posted By: andymps
Uptime probs - 25/08/03 02:21 PM
i am doing a sys info dialog, but when i get to the uptime parts i want the to count as the uptime increases, so u put them on a 1 second timer, that was te easy bit, the hard bit is, how do i get it to display it in 0Weeks 0Days 0hours 0Mins 0secons
Posted By: Rich
Re: Uptime probs - 25/08/03 03:27 PM
$duration($calc($uptime(system) / 1000))
Or if you want to split it up:
var %uptime = $duration($calc($uptime(system) / 1000))
var %secs = $gettok(%uptime,-1,32)
var %mins = $gettok(%uptime,-2,32)
var %hours = $gettok(%uptime,-3,32)
;etc
Posted By: qwerty
Re: Uptime probs - 25/08/03 03:55 PM
Or just $uptime(system,3)
Posted By: Rich
Re: Uptime probs - 26/08/03 11:48 AM
Didn't think of that, or even better:
$uptime(system,1)