View Single Post
Old 04-12-2006, 12:38 PM  
snatsert
Member
 
Join Date: Mar 2003
Posts: 61
Default

Quote:
Originally Posted by neoxed
You would have to edit the FormatSpeed procedure in nxLib.tcl.

I will not add support for this because it is inconsistent with ioFTPD's behavior. ioFTPD displays all speeds in bytes per second (rather than bits), so it would be logical for all scripts to do the same.

someting in this part ??

proc ::nxLib::FormatSpeed {speed {seconds 0}} {
if {$seconds > 0} {set speed [expr {double($speed) / $seconds}]}
foreach decimals {0 2 2} unit {KB/s MB/s GB/s} {
if {abs($speed) < 1024} {break}
set speed [expr {double($speed) / 1024.0}]
}
return [format "%.*f%s" $decimals $speed $unit]

can you tell me what I excactly should change ?

thnx
snatsert is offline   Reply With Quote