search for: print_cp_result_tick

Displaying 2 results from an estimated 2 matches for "print_cp_result_tick".

2010 Mar 18
0
[MODULE] COM32 module to time null-dumping a file
...LK_TCK); + dr = ((float)bcnt) / et; + printf(" %dB in %.3fs from '%s'\n", bcnt, et, fn); + printf(" %.0f B/s; %.0f KiB/s; %.0f MiB/s\n", dr, dr/1024, dr/1048576); +} /* void print_cp_result2(char *fn, int bcnt, clock_t bc, clock_t ec) */ +#endif /* __COM32__ */ + +void print_cp_result_tick(int bcnt, clock_t et, float tps, int offs) +{ + int dr; + dr = bcnt * tps / max(1,(et + offs)); // prevent divide by 0 + printf(" %+d %d B/s; %d KiB/s; %d MiB/s\n", offs, dr, dr/1024, dr/1048576); +} /* void print_cp_result_tick(int bcnt, clock_t et, float tps, int offs) */ + +void print...
2010 Mar 20
1
[MODULE] COM32 module to time null-dumping a file, v1.1
...*/ + +#ifndef SSIZE_MAX +# define SSIZE_MAX PTRDIFF_MAX +#endif +/* typedef ptrdiff_t ssize_t; */ +#define BUFSZ_MAX SSIZE_MAX +/* ssize_t max */ +#define BUFSZ_MIN 1 +#ifndef OFF_MAX +# define OFF_MAX SIZE_MAX +#endif +/* typedef size_t off_t */ +#define LEN_MAX OFF_MAX +/* off_t max */ + +void print_cp_result_tick(int bcnt, clock_t et, float tps, int offs) +{ + int dr; + dr = bcnt * tps / max(1,(et + offs)); // prevent divide by 0 + printf(" %+d %d B/s; %d KiB/s; %d MiB/s\n", offs, dr, dr/1024, dr/1048576); +} /* void print_cp_result_tick(int bcnt, clock_t et, float tps, int offs) */ + +void print...