How do I create a function to process each millisecond? - page 2

 
Реter Konow:

In OnInit() add a line,

and in OnDeinit()


After that, transfer the call of drawing functions from the OnTick() function to the OnTimer() function

ok. I'll try it! )

 
Реter Konow:

In OnInit() add a line,

and in OnDeinit()


After that, move call of drawing functions from function OnTick() to function OnTimer()

Wow, it works!!!!!! I didn't understand anything though. But... it works.

 
Yuriy Vins:

OK. I'll give it a try! )

Reg Konow

I am very grateful to you for the tip! Well, I'll be figuring out "what's how and why! ))

 
Yuriy Vins:

Wow! It's working!!!!!! I didn't understand anything, though. But... It works.

The ChartRedraw function has a cost of 40 milliseconds, so it doesn't make sense to update the timer after 16.

40 milliseconds corresponds to 25 frames per second which is equal to human perception speed.

 
Nikolay Demko:

The ChartRedraw function has a cost of 40 milliseconds, so there is no point in updating the timer after 16.

40 milliseconds corresponds to 25 frames per second, which is the same speed of human perception.

In all my years of doing graphics, I've never usedChartRedraw(). I don't even know why I need it. )

But I hadn't thought about the 40 ms delay. Maybe it really doesn't make sense to use it more often...

 
Nikolay Demko:

The ChartRedraw function has a cost of 40 milliseconds, so there is no point in updating the timer after 16.

40 milliseconds corresponds to 25 frames per second, which is equal to human perception speed.

Thank you! I'll look into it too! It may come in handy. ))

 
Nikolay Demko:

The ChartRedraw function has a cost of 40 milliseconds, so there is no point in updating the timer after 16.

40 milliseconds corresponds to 25 frames per second, which is equal to human perception speed.

Nah, you need at least 50fps for real smoothness.
Analogue TV drew 50-60 half-frames for a reason.

 
Yuriy Vins:

Tag Konow.

I'm very grateful to you for the tip! Well, I'll be figuring out "what's how and why!" ))

Glad to help. Feel free to contact me if you need it.

 
Yuriy Vins:
It's not working so far. I'll have to do some more reading...

Already written above, the minimum interval is above 16ms. and depends heavily on the CPU load and the number of processes running in the OS. Windows is not a real time OS.

 
Taras Slobodyanik:

No, you need at least 50 fps for real smoothness.
Analogue TV drew 50-60 half-frames for a reason.

24 fps is enough if you didn't read TV books as a child))))