nisa,<br><br>I believe the following will supply timing to ms level.<br>I'm not sure about it being relative to program start as I usually call it once at the start of a process and once again when I am done. Its enough for me to calculate fairly accurate FPS calculations (the only thing it was needed for).<br>
The difference between them (barring wrap around issues) is the time.<br><br>#include <sys/time.h><br><br>unsigned long GetTicks()<br>{<br> struct timeval now;<br> unsigned long ticks;<br> gettimeofday(&now, NULL);<br>
ticks=(now.tv_sec)*1000+(now.tv_usec)/1000;<br> return(ticks);<br>}<br><br><br>Gary (lcuk on #maemo)<br><br><br><br><div class="gmail_quote">On Tue, Jul 8, 2008 at 7:24 PM, nisha jain <<a href="mailto:jain61@gmail.com">jain61@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Hi All,</div>
<div> </div>
<div>I am trying to get current system time in milliseconds with respect to the program starting using </div>
<div> </div>
<div>#include <sys/timeb.h></div>
<div> </div>
<div>As i need to milisecond precision and i checked this header it is present under ARMEL </div>
<div> </div>
<div>but i am not able to include it during compile time i used -I/usr/include/sys path as it is </div>
<div> </div>
<div>present under this path... I am not sure how i can include and use it?</div>
<div> </div>
<div>Please if some one know how the N800 System time can be captured in millisecond precision let me know?</div>
<div> </div>
<div>I also tried using the CLOCKS_PER_SEC command to use it but it is not giving proper values</div>
<div> </div>
<div>Please let me know if some does similar and have solution for it?</div>
<div> </div>
<div>Thanks and Regards,</div>
<div>Nisha</div>
<br>_______________________________________________<br>
maemo-developers mailing list<br>
<a href="mailto:maemo-developers@maemo.org">maemo-developers@maemo.org</a><br>
<a href="https://lists.maemo.org/mailman/listinfo/maemo-developers" target="_blank">https://lists.maemo.org/mailman/listinfo/maemo-developers</a><br>
<br></blockquote></div><br>