libdmtx 0.7.8.7
libdmtx is a software library that enables programs to read and write Data Matrix barcodes of the modern ECC200 variety.
Loading...
Searching...
No Matches
dmtxtime.c File Reference

libdmtx - Data Matrix Encoding/Decoding Library Copyright 2008, 2009 Mike Laughton. More...

#include <errno.h>
#include "dmtx.h"
#include <time.h>

Go to the source code of this file.

Macros

#define DMTX_USEC_PER_SEC   1000000
 
#define DMTX_TIME_PREC_USEC   1000000
 

Functions

DmtxTime dmtxTimeNow (void)
 Generic 1 second resolution version.
 
DmtxTime dmtxTimeAdd (DmtxTime t, long msec)
 Add milliseconds to time t.
 
int dmtxTimeExceeded (DmtxTime timeout)
 Determine whether the received timeout has been exceeded.
 

Detailed Description

libdmtx - Data Matrix Encoding/Decoding Library Copyright 2008, 2009 Mike Laughton.

All rights reserved. Copyright 2012-2016 Vadim A. Misbakh-Soloviov. All rights reserved.

See LICENSE file in the main project directory for full terms of use and distribution.

Contact: Vadim A. Misbakh-Soloviov dmtx@.nosp@m.mva..nosp@m.name Mike Laughton mike@.nosp@m.drag.nosp@m.onfly.nosp@m.logi.nosp@m.c.com

Time handling

Definition in file dmtxtime.c.

Macro Definition Documentation

◆ DMTX_TIME_PREC_USEC

#define DMTX_TIME_PREC_USEC   1000000

Definition at line 80 of file dmtxtime.c.

◆ DMTX_USEC_PER_SEC

#define DMTX_USEC_PER_SEC   1000000

Definition at line 21 of file dmtxtime.c.

Function Documentation

◆ dmtxTimeAdd()

DmtxTime dmtxTimeAdd ( DmtxTime t,
long msec )
extern

Add milliseconds to time t.

Parameters
t
msec
Returns
Adjusted time

Definition at line 110 of file dmtxtime.c.

◆ dmtxTimeExceeded()

int dmtxTimeExceeded ( DmtxTime timeout)
extern

Determine whether the received timeout has been exceeded.

Parameters
timeout
Returns
1 (true) | 0 (false)

Definition at line 139 of file dmtxtime.c.

◆ dmtxTimeNow()

DmtxTime dmtxTimeNow ( void )
extern

Generic 1 second resolution version.

Returns
Time now

Definition at line 86 of file dmtxtime.c.