Features of the mql5 language, subtleties and tricks - page 91

 
Alexey Navoykov:

Why not calculate GetTickCount in the same way? Then the problem of 15 ms resolution, which is problematic, will disappear.

Because it is such a function with clearly described functionality and execution speed.

If you want to accurately measure short periods of time, use a microsecond timer. If you want accuracy up to 16 ms then use faster millisecond timer.

 
Renat Fatkhullin:

Because it is a function with clearly described functionality and speed of execution.

Is the execution speed described somewhere? I didn't see it in your documentation. And how does my suggestion affect functionality? Is limiting the resolution to 15 ms a functionality? It seems to be a drawback. A forced measure. Why import disadvantages when you can avoid them by using a more efficient solution.

If you want to accurately measure short intervals, use a microsecond timer. If an error of up to 16 ms is sufficient, use a faster millisecond timer.

You probably haven't carefully read the last few pages which are about the fact that your microsecond timer doesn't meet the stated goals. It is problematic to use it to measure intervals because it is tied to the local computer time, unlike the regular PerfomanceCounter which I cited as an example.

 
Alexey Navoykov:

You probably didn't read the last few pages carefully, which says that your microsecond timer is not fit for purpose. It is problematic to use it to measure time intervals, because it is tied to the local computer time, unlike the regular PerfomanceCounter, which I gave you as an example.

Where did you get the power cord from?

GetMicrosecondCount uses QueryPerformanceCounter.

Measure the difference between the two values obtained with GetMicrosecondCount, and you won't depend on either the initial value or the local time change tricks.

 
Alexey Navoykov:

Is the execution speed described somewhere? I didn't see it in your documentation. And how does my suggestion affect functionality? Is limiting the resolution to 15 ms a functionality? It seems to be a flaw. A forced measure. Why import disadvantages when you can avoid them by using a more efficient solution.

You probably didn't read the last few pages carefully, which says that your microsecond timer is not fit for purpose. It is problematic to use it to measure intervals because it is tied to local computer time, unlike the regular PerfomanceCounter which I gave you as an example.

Pay attention that it's you who ask questions, not me.

So you don't know the subject. I know it very well and answer you, but you somehow forget about your ignorance and even demand.
 
Slava:

Measure the difference between the two GetMicrosecondCount values, and you will not depend on either the initial value or the local time change focus.

If the local time was changed between the two GetMicrosecondCounts, their difference will show something different.

 
fxsaber:

If the local time was changed between the two GetMicrosecondCounts, their difference will show something different.

SSZB.

 
Renat Fatkhullin:

SSZB.

:)

 
Renat Fatkhullin:

PRSB.

Explain this to the Market Buyers.

 
Very constructive conversation )
 
fxsaber:

Explain this to the Market Buyers.

What is the probability of changing the local computer time between two calls to GetMicrosecondsCount used to measure time in microseconds?