diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-09 08:24:01 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-09 08:24:01 +0100 |
commit | 097edb90b7826ad7557777cc102de2630f235141 (patch) | |
tree | 9b3c89fb7e576691356460ae134fe9be5bbf0500 /tools.c | |
parent | de31339c3382d32be9c4440466b1d01e40e0d0b3 (diff) | |
download | pcitool-097edb90b7826ad7557777cc102de2630f235141.tar.gz pcitool-097edb90b7826ad7557777cc102de2630f235141.tar.bz2 pcitool-097edb90b7826ad7557777cc102de2630f235141.tar.xz pcitool-097edb90b7826ad7557777cc102de2630f235141.zip |
Gathering a bit of statistics
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -310,6 +310,10 @@ int pcilib_sleep_until_deadline(struct timeval *tv) { return 0; } +pcilib_timeout_t pcilib_timediff(struct timeval *tvs, struct timeval *tve) { + return ((tve->tv_sec - tvs->tv_sec)*1000000 + (tve->tv_usec - tvs->tv_usec)); +} + int pcilib_timecmp(struct timeval *tv1, struct timeval *tv2) { if (tv1->tv_sec > tv2->tv_sec) return 1; else if (tv1->tv_sec > tv2->tv_sec) return -1; |