Logo Search packages:      
Sourcecode: pcsc-lite version File versions  Download package

long int time_sub ( struct timeval *  a,
struct timeval *  b 
)

return the difference (as long int) in ┬Ás between 2 struct timeval r = a - b

Definition at line 106 of file utils.c.

Referenced by MessageReceiveTimeout(), and SCardGetStatusChange().

{
      struct timeval r;
      r.tv_sec = a -> tv_sec - b -> tv_sec;
      r.tv_usec = a -> tv_usec - b -> tv_usec;
      if (r.tv_usec < 0)
      {
            r.tv_sec--;
            r.tv_usec += 1000000;
      }

      return r.tv_sec * 1000000 + r.tv_usec;
} /* time_sub */

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index