6 #include "../qrencode.h"
11 void timerStart(const char *str)
13 printf("%s: START\n", str);
14 gettimeofday(&tv, NULL);
21 gettimeofday(&tc, NULL);
22 printf("STOP: %ld msec\n", (tc.tv_sec - tv.tv_sec) * 1000
23 + (tc.tv_usec - tv.tv_usec) / 1000);
26 void prof_ver1to10(void)
31 static const char *data = "This is test.";
33 timerStart("Version 1 - 10 (500 symbols for each)");
34 for(i=0; i<500; i++) {
35 for(version = 0; version < 11; version++) {
36 code = QRcode_encodeString(data, version, QR_ECLEVEL_L, QR_MODE_8, 0);
38 perror("Failed to encode:");
47 void prof_ver31to40(void)
52 static const char *data = "This is test.";
54 timerStart("Version 31 - 40 (50 symbols for each)");
56 for(version = 31; version < 41; version++) {
57 code = QRcode_encodeString(data, version, QR_ECLEVEL_L, QR_MODE_8, 0);
59 perror("Failed to encode:");