Anyone know the formula for transforming the info in /proc/uptime to weeks days hours mins and secs (want it to say the uptime nice to the channel on when triggered. like 1week 2days 34min and so on .. not bot uptime .. but machine uptime) ?
<font size=-1>[ This Message was edited by: woffer on 2001-11-08 16:06 ]</font>
Yea, i've looked there.. but i've only found scripts that gives the bots uptime or the machine uptime in only days.. so far.. will continue to look... =)
proc get_time {total} {
set seconds [expr $total % 60]
set total [expr $total / 60]
set minutes [expr $total % 60]
set total [expr $total / 60]
set hours [expr $total % 24]
set total [expr $total / 24]
set days [expr $total % 365]
set years [expr $total / 365]
return [list $years $days $hours $minutes $seconds]
}