Add timing and polling infrastructure

Add timeout mechanism as an asynchronous equivalent of sleeping (uru4000
needs this).

Start implementing polling infrastructure which also accounts for pending
timeouts. We don't expose file descriptors yet, but this is a start.
This commit is contained in:
Daniel Drake
2008-02-16 12:44:50 +00:00
parent eff26bf0be
commit 866dd941cc
6 changed files with 277 additions and 13 deletions

View File

@@ -21,6 +21,7 @@
#define __FPRINT_H__
#include <stdint.h>
#include <sys/time.h>
/* structs that applications are not allowed to peek into */
struct fp_dscv_dev;
@@ -265,6 +266,10 @@ struct fp_img *fp_img_binarize(struct fp_img *img);
struct fp_minutia **fp_img_get_minutiae(struct fp_img *img, int *nr_minutiae);
void fp_img_free(struct fp_img *img);
/* Polling and timing */
int fp_handle_events_timeout(struct timeval *timeout);
int fp_handle_events(void);
/* Library */
int fp_init(void);
void fp_exit(void);