Hi
Can u set the QTimer Time Resolution to be less then milisecond . Also can the interval value would be in double float etc
Hi
Can u set the QTimer Time Resolution to be less then milisecond . Also can the interval value would be in double float etc
No and No.
If you want accuracy of less than a millisecond, you need platform specific functions.
What are you trying to do?
Hi
So suppose i have choosen a variable of double for timeinterval and may be value less then 1 milisec lets take .2 so in this case the next timerevent will fire after completion of 1 milisec
in this case there will 5 complete interval but timer event is called only after 1 mili sec or 5 times in amili sec
No.so in this case the next timerevent will fire after completion of 1 milisec
It will fire as the doc states:
Which can be any interval.A QTimer with a timeout interval of 0 will time out as soon as all the events in the window system's event queue have been processed.
In addition, saying that the QTimer will fire with 1 ms resolution is also not 100% correct.
QTimer takes interval values in 1 ms resolution.
The actual interval might, and usually does vary, depending on the current system and its state.
Under windows, having a less than 1 ms timer resolution is probably not really practical/possible - I know wysota will laugh at the notion alone.
You might find this interesting:
http://www.qtcentre.org/threads/4031...Timer-accuracy
And if you are on windows:
http://msdn.microsoft.com/en-us/magazine/cc163996.aspx
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Bookmarks