Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Callbacks and Timers » SetTimeCallback failure on arch=armv5l POSIX_PLATFORM
Re: SetTimeCallback failure on arch=armv5l POSIX_PLATFORM [message #16564 is a reply to message #16559] Thu, 26 June 2008 16:25 Go to previous messageGo to previous message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member

We put cout statements in the code during debug and found
that overflow did not occur because of the following code
in Util.cpp

The reset to a correct value must occur earlier than the
range of the int because of the modulo math in GetTickCount().


#ifdef PLATFORM_POSIX
int GetTickCount() {
struct timeval tv[1];
struct timezone tz[1];
memset(tz, 0, sizeof(tz));
gettimeofday(tv, tz);
return tv->tv_sec % 1000000 * 1000 + tv->tv_usec / 1000;
}
#endif


--jlf
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Is there an easy way to leverage callback into multi-cast delegate?
Next Topic: SetTimeCallback without Graphics
Goto Forum:
  


Current Time: Sun May 05 12:59:05 CEST 2024

Total time taken to generate the page: 0.02576 seconds