I am looking at
long ifd_time_elapsed( struct ifd_time *then )
{
struct timeval now, delta, then_tv;
then_tv.tv_sec = then->p1;
then_tv.tv_usec = then->p2;
gettimeofday(&now, NULL);
timersub(&now, &then_tv, &delta);
return delta.tv_sec * 1000 + (delta.tv_usec % 1000);
}
what does last line do? tv_sec is in seconds and tv_usec is in
microseconds. The sum adds milliseconds from tv_sec and lowest 1000
microseconds. Should it be
return delta.tv_sec * 1000 + (delta.tv_usec / 1000);
instead? Thanks!
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel