Paul Davis wrote:
On Tue, 2006-05-02 at 13:45 -0400, Derek Piper wrote:
Hi,
Thanks to all for the helpful hints, even with my vague descriptions.
It turns out that it was a problem under Windows in getting the current
time. Using timeGetTime() from the multimedia timers I wanted to convert
it to microseconds in keeping with the value from gettimeofday that's
used in the rest of my program. Anyway, when multiplying that value by
1000 and assigning it to a larger data type of 'long long' it multiplied
it within a single 32bit integer and overflowed it.
hint:
#include <sys/time.h>
struct timeval now, then, diff;
gettimeofday (&then, NULL);
...
gettimeofday (&now, NULL);
timersub (&now, &then, &diff);
Not in Windows (at least not in a MinGW build) and not at the resolution
needed either (function was used for other things). Other than that,
great :>
--
Derek Piper - dcpiper@xxxxxxxxxxx - (812) 856 0111
IRI 323, School of Informatics
Indiana University, Bloomington, Indiana
_______________________________________________
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list