libdc1394/libdc1394-grab_partial_image-CLK_TCK.patch

33 lines
1.1 KiB
Diff

from time.h:
/* This defines CLOCKS_PER_SEC, which is the number of processor clock
ticks per second. */
# include <bits/time.h>
/* This is the obsolete POSIX.1-1988 name for the same constant. */
# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
# ifndef CLK_TCK
# define CLK_TCK CLOCKS_PER_SEC
# endif
# endif
examples/grab_partial_image.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: libdc1394-1.2.1/examples/grab_partial_image.c
===================================================================
--- libdc1394-1.2.1.orig/examples/grab_partial_image.c
+++ libdc1394-1.2.1/examples/grab_partial_image.c
@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
/*---------------------------------------------------------------------
* output elapsed time
*---------------------------------------------------------------------*/
- elapsed_time = (float)(times(&tms_buf) - start_time) / CLK_TCK;
+ elapsed_time = (float)(times(&tms_buf) - start_time) / CLOCKS_PER_SEC;
printf( "got frame %d. elapsed time: %g sec ==> %g frames/second\n",
i, elapsed_time, (float)i / elapsed_time);
}