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 » TimerCallBack interval resolution
Re: TimerCallBack interval resolution [message #58018 is a reply to message #58017] Wed, 19 January 2022 13:19 Go to previous messageGo to previous message
Tom1
Messages: 1212
Registered: March 2007
Senior Contributor
Hi Deepak,

Are you running on Windows? If so, you can improve your timing to one millisecond resolution by adding this in your program:
#ifdef _WIN32
#include <MMSystem.h>

INITBLOCK{
	timeBeginPeriod(1);
}

EXITBLOCK{
	timeEndPeriod(1);
}
#endif

You may also want to use usecs() for measuring time at better than millisecond resolution.

Best regards,

Tom

[Updated on: Wed, 19 January 2022 13:22]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to do to stop progress zip file ?
Goto Forum:
  


Current Time: Fri May 03 23:11:25 CEST 2024

Total time taken to generate the page: 0.03151 seconds