add timer test

This commit is contained in:
tonton th 2021-01-14 13:52:04 +01:00
parent 35e7354396
commit 8a1b164ea7
1 changed files with 21 additions and 2 deletions

23
lib/t.c
View File

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