21#define DMTX_USEC_PER_SEC 1000000
23#if defined(HAVE_SYS_TIME_H) && defined(HAVE_GETTIMEOFDAY)
27# define DMTX_TIME_PREC_USEC 1
39 err = gettimeofday(&tv, NULL);
44 tNow.usec = tv.tv_usec;
49#elif defined(_MSC_VER)
52# define DMTX_TIME_PREC_USEC 1
64 GetSystemTimeAsFileTime(&ft);
66 tm = ft.dwHighDateTime;
68 tm |= ft.dwLowDateTime;
71 tNow.sec = tm / 1000000UL;
72 tNow.usec = tm % 1000000UL;
80# define DMTX_TIME_PREC_USEC 1000000
145 return (now.sec > timeout.sec || (now.sec == timeout.sec && now.usec > timeout.usec));
148#undef DMTX_TIME_PREC_USEC
149#undef DMTX_USEC_PER_SEC
libdmtx - Data Matrix Encoding/Decoding Library Copyright 2008, 2009 Mike Laughton.
DmtxTime dmtxTimeNow(void)
Generic 1 second resolution version.
#define DMTX_TIME_PREC_USEC
int dmtxTimeExceeded(DmtxTime timeout)
Determine whether the received timeout has been exceeded.
DmtxTime dmtxTimeAdd(DmtxTime t, long msec)
Add milliseconds to time t.
#define DMTX_USEC_PER_SEC