Browse Source

add timer test

master
tonton th 2 years ago
parent
commit
8a1b164ea7
  1. 23
      lib/t.c

23
lib/t.c

@ -13,6 +13,22 @@ @@ -13,6 +13,22 @@
int verbosity;
/* ---------------------------------------------------------------- */
int essai_timer(int uuuh)
{
double A, B;
fprintf(stderr, ">>> %s ( %d )\n", __func__, uuuh);
A = fimg_timer_set(uuuh);
sleep(4);
B = fimg_timer_get(uuuh);
fprintf(stderr, " %f %f\n", A, B);
return 0;
}
/* ---------------------------------------------------------------- */
int essai_normalize(void)
{
@ -20,6 +36,7 @@ FloatImg A; @@ -20,6 +36,7 @@ FloatImg A;
float val;
int foo;
#if 0
foo = fimg_create(&A, 512, 512, FIMG_TYPE_RGB);
if (foo) {
fprintf(stderr, "%s err create A %d\n", __func__, foo);
@ -43,6 +60,8 @@ fprintf(stderr, "AFTER max pixel %f\n", val); @@ -43,6 +60,8 @@ fprintf(stderr, "AFTER max pixel %f\n", val);
fimg_destroy(&A);
#endif
return 0;
}
/* ---------------------------------------------------------------- */
@ -280,8 +299,8 @@ if (verbosity) { @@ -280,8 +299,8 @@ if (verbosity) {
// foo = essai_clone_et_copy(0);
// fprintf(stderr, "retour essai clone'n'copy -> %d\n", foo);
foo = essai_get_values("quux.fimg");
fprintf(stderr, "retour essai interpolate -> %d\n", foo);
foo = essai_timer(0);
fprintf(stderr, "retour essai -> %d\n", foo);
return 0;
}

Loading…
Cancel
Save