Hash :
b429a37c
Author :
Date :
2007-12-13T11:33:34
- Case-sensitive mode has been added to QRcode_encodeString(). - "-8" option has been added to qrenc.c. - "-c" now encodes in improved case-sensitive mode. - test_split*() have been moved to test_split.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include "../qrencode.h"
struct timeval tv;
void timerStart(const char *str)
{
printf("%s: START\n", str);
gettimeofday(&tv, NULL);
}
void timerStop(void)
{
struct timeval tc;
gettimeofday(&tc, NULL);
printf("STOP: %ld msec\n", (tc.tv_sec - tv.tv_sec) * 1000
+ (tc.tv_usec - tv.tv_usec) / 1000);
}
void prof_ver1to10(void)
{
QRcode *code;
int i;
int version;
static char *data = "This is test.";
timerStart("Version 1 - 10");
for(i=0; i<500; i++) {
for(version = 0; version < 11; version++) {
code = QRcode_encodeString(data, version, QR_ECLEVEL_L, QR_MODE_8, 0);
QRcode_free(code);
}
}
timerStop();
}
int main()
{
prof_ver1to10();
return 0;
}