2 * This file has been modified for the cdrkit suite.
4 * The behaviour and appearence of the program code below can differ to a major
5 * extent from the version distributed by the original author(s).
7 * For details, see Changelog file distributed with the cdrkit package. If you
8 * received this file from another source then ask the distributing person for
9 * a log of modifications.
20 #define Uchar unsigned char
22 static int encspeed(void);
36 end = 75*1000000 * secs;
38 memset(sect, 0, sizeof(sect));
39 for (i=0; i < 2352; ) {
44 gettimeofday(&tv, (struct timezone *)0);
45 for (i=0; i < end; i++) {
47 do_encode_L2(sect, 1, 1);
51 /* lec_encode_mode1_sector(12345, sect);*/
52 /* lec_scramble(sect);*/
54 /* if ((i & 31) == 0) {*/
56 gettimeofday(&tv2, (struct timezone *)0);
57 if (tv2.tv_sec >= (tv.tv_sec+secs) &&
58 tv2.tv_usec >= tv.tv_usec)
62 printf("%d sectors/%ds\n", i, secs);
63 printf("%d sectors/s\n", i/secs);
64 printf("speed: %5.2fx\n", (1.0*i)/750.0);
65 return ((i+74)/75) / secs ;
68 int main(int argc, char *argv[])
72 /* printf("speed: %d\n", encspeed());*/