tesseract  4.0.0-1-g2a2b
gettimeofday.h File Reference

Go to the source code of this file.

Typedefs

typedef struct timezone tz
 

Functions

int gettimeofday (struct timeval *tp, struct timezone *tzp)
 

Typedef Documentation

◆ tz

typedef struct timezone tz

Definition at line 27 of file gettimeofday.h.

Function Documentation

◆ gettimeofday()

int gettimeofday ( struct timeval *  tp,
struct timezone *  tzp 
)

Definition at line 23 of file gettimeofday.cpp.

23  {
24  l_int32 sec, usec;
25  if (tp == nullptr)
26  return -1;
27 
28  l_getCurrentTime(&sec, &usec);
29  tp->tv_sec = sec;
30  tp->tv_usec = usec;
31  return 0;
32 }