/[mldonkey]/mldonkey/src/networks/donkey/donkeyStats.ml
ViewVC logotype

Diff of /mldonkey/src/networks/donkey/donkeyStats.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by spiralvoice, Tue Jul 12 23:03:14 2005 UTC revision 1.19 by spiralvoice, Fri Jul 29 22:42:17 2005 UTC
# Line 721  let new_print_stats buf o = Line 721  let new_print_stats buf o =
721    
722    if use_html_mods o then    if use_html_mods o then
723      begin      begin
724        Printf.bprintf buf "\\<div class=\\\"cs\\\"\\>Session Uptime: %d days, %02dh:%02dm (= %d seconds)\\</div\\>"        Buffer.add_string buf "\\<div class=\\\"cs\\\"\\>\n";
725          days hours mins session_time;        html_mods_table_one_row buf "csTable" "cs" [
726            ("", "srh",
727              Printf.sprintf "Session Uptime: %d days, %02dh:%02dm (= %d seconds)"
728                days hours mins session_time); ];
729          Buffer.add_string buf "\\</div\\>\n";
730    
731        stats_html_header buf;        stats_html_header buf;
732    
733        let counter = ref 0 in        let counter = ref 0 in
# Line 806  let new_print_stats buf o = Line 811  let new_print_stats buf o =
811               (Int64.to_float stats_by_brand.(i).brand_upload) )));               (Int64.to_float stats_by_brand.(i).brand_upload) )));
812          end          end
813        done;        done;
814        Printf.bprintf buf "\\</table\\>\\</div\\>\n";        Buffer.add_string buf "\\</table\\>\\</div\\>\n";
815    
816        let gdays = (guptime () + uptime) / one_day in        let gdays = (guptime () + uptime) / one_day in
817        let grem = maxi 1 ((guptime () + uptime) - gdays * one_day) in        let grem = maxi 1 ((guptime () + uptime) - gdays * one_day) in
# Line 815  let new_print_stats buf o = Line 820  let new_print_stats buf o =
820        let grem = grem - ghours * one_hour in        let grem = grem - ghours * one_hour in
821        let gmins = grem / one_minute in        let gmins = grem / one_minute in
822    
823        Printf.bprintf buf "\n\\<div class=\\\"cs\\\"\\>Total Uptime: %d days, %02dh:%02dm (= %d seconds)\\</div\\>"        Buffer.add_string buf "\\<div class=\\\"cs\\\"\\>\n";
824          gdays ghours gmins (guptime() + uptime);        html_mods_table_one_row buf "csTable" "cs" [
825            ("", "srh",
826              Printf.sprintf "Total Uptime: %d days, %02dh:%02dm (= %d seconds)"
827                gdays ghours gmins (guptime() + uptime)); ];
828          Buffer.add_string buf "\\</div\\>\n";
829    
830        stats_html_header buf;        stats_html_header buf;
831    
832        showTotal := false;        showTotal := false;
# Line 892  let new_print_stats buf o = Line 902  let new_print_stats buf o =
902              (Int64.to_float !!gstats_by_brand.(i).brand_upload) )))              (Int64.to_float !!gstats_by_brand.(i).brand_upload) )))
903          end          end
904        done;        done;
905        Printf.bprintf buf "\\</table\\>\\</div\\>\n";        Buffer.add_string buf "\\</table\\>\\</div\\>\n";
906      end      end
907    else    else
908      begin      begin
# Line 1000  let new_print_mod_stats buf o = Line 1010  let new_print_mod_stats buf o =
1010    
1011    if use_html_mods o then    if use_html_mods o then
1012      begin      begin
1013        Printf.bprintf buf "\\<div class=\\\"cs\\\"\\>Session Uptime: %d days, %02dh:%02dm (= %d seconds)\\</div\\>"        Buffer.add_string buf "\\<div class=\\\"cs\\\"\\>\n";
1014          days hours mins session_time;        html_mods_table_one_row buf "csTable" "cs" [
1015            ("", "srh",
1016              Printf.sprintf "Session Uptime: %d days, %02dh:%02dm (= %d seconds)"
1017                days hours mins session_time); ];
1018          Buffer.add_string buf "\\</div\\>\n";
1019        stats_html_header buf;        stats_html_header buf;
1020    
1021        let counter = ref 0 in        let counter = ref 0 in
# Line 1085  let new_print_mod_stats buf o = Line 1099  let new_print_mod_stats buf o =
1099               (Int64.to_float stats_by_brand_mod.(i).brand_mod_upload) )));               (Int64.to_float stats_by_brand_mod.(i).brand_mod_upload) )));
1100          end          end
1101        done;        done;
1102        Printf.bprintf buf "\\</table\\>\\</div\\>\n";        Buffer.add_string buf "\\</table\\>\\</div\\>\n";
1103    
1104        let gstats_all =        let gstats_all =
1105          let stat = {          let stat = {
# Line 1113  let new_print_mod_stats buf o = Line 1127  let new_print_mod_stats buf o =
1127        let grem = grem - ghours * one_hour in        let grem = grem - ghours * one_hour in
1128        let gmins = grem / one_minute in        let gmins = grem / one_minute in
1129    
1130        Printf.bprintf buf "\n\\<div class=\\\"cs\\\"\\>Total Uptime: %d days, %02dh:%02dm (= %d seconds)\\</div\\>"        Buffer.add_string buf "\\<div class=\\\"cs\\\"\\>\n";
1131          gdays ghours gmins (guptime() + uptime);        html_mods_table_one_row buf "csTable" "cs" [
1132            ("", "srh",
1133              Printf.sprintf "Total Uptime: %d days, %02dh:%02dm (= %d seconds)"
1134                gdays ghours gmins (guptime() + uptime)); ];
1135          Buffer.add_string buf "\\</div\\>\n";
1136    
1137        stats_html_header buf;        stats_html_header buf;
1138    
1139        showTotal := false;        showTotal := false;
# Line 1190  let new_print_mod_stats buf o = Line 1209  let new_print_mod_stats buf o =
1209              (Int64.to_float !!gstats_by_brand_mod.(i).brand_mod_upload) )))              (Int64.to_float !!gstats_by_brand_mod.(i).brand_mod_upload) )))
1210          end          end
1211        done;        done;
1212        Printf.bprintf buf "\\</table\\>\\</div\\>\n";        Buffer.add_string buf "\\</table\\>\\</div\\>\n";
1213      end      end
1214    else    else
1215      begin      begin

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26