Autor: Maciej Eckstein (sherlock_at_it.com.pl)
Data: Thu 09 May 1996 - 19:52:36 MET DST
Jarek Lis wrote:
> Laskawco - zrodelko! Nie uruchamiam na moim komputerze podejrzanych
> programow...
jakich podejrzanych? :) kod na samym koncu (styl codowanie nie sldny bo
byla 1 w nocy jak konczylem )
> po Caviarze spodziewalbym sie raczej 5999....
no tak dobrze to nie ale moze z lepszej plyt?
pozdrowienia
-------begin source-----------
#include <stdio.h>
#include <dos.h>
#include <conio.h>
#include <process.h>
#include <sys\stat.h>
#define FILENAME "test"
int main(void)
{
clrscr();
struct dostime_t t_przed;
struct dostime_t t_po;
int czast=0;
struct stat statbuf;
float przewal;
stat(FILENAME, &statbuf);
printf ("Copyright by Sherlock 96\n");
printf("Size of file in bytes: %ld\n\n", statbuf.st_size);
float size=statbuf.st_size/1024;
for (int i=0;i<3;i++){
_dos_gettime(&t_przed);
system("copy /b test nul /b");
_dos_gettime(&t_po);
int temp,sek;
if (t_po.second<t_przed.second)
{temp=60-t_przed.second;sek=temp+t_po.second;}
else
{sek=t_po.second-t_przed.second;};
int milisek=t_po.hsecond-t_przed.hsecond;
int czas=(sek*100)+milisek;
printf("czas = %d ", czas);
czast=czast+czas;
przewal=(size/czas)*100;
printf ("Transfer =%f KB\n",przewal);
}
przewal=((size*3)/(czast))*100;
printf ("\n\n Sredni Transfer =%f KB\n",przewal);
int check;
getch();
}
To archiwum zostało wygenerowane przez hypermail 2.1.7 : Tue 18 May 2004 - 12:43:48 MET DST