mIRC Home    About    Download    Register    News    Help

Print Thread
#44088 25/08/03 02:21 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
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


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#44089 25/08/03 03:27 PM
Joined: Dec 2002
Posts: 117
R
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
$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


$input(Me like stars, You too?)
#44090 25/08/03 03:39 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
it works ty ty


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
#44091 25/08/03 03:55 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Or just $uptime(system,3)


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#44092 26/08/03 11:48 AM
Joined: Dec 2002
Posts: 117
R
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
Didn't think of that, or even better:
$uptime(system,1)


$input(Me like stars, You too?)

Link Copied to Clipboard