Download MetaTrader 5

Please help with GetTickCount(). Documentation is poorly written.

To add comments, please log in or register
skatt
187
skatt  

I'd like to use GetTickCount(), but the documentation is so confusing. Please help.

According to the GetTickCount() documentation, it returns the "number of milliseconds that elapsed since the system start". Does that mean since the start of the expert program, the trading terminal, or the operating system?

Also, the documentation states that the unsigned integer is "overfilled" every 49.7 days? What does that mean? Does GetTickCount() stop changing at the highest value? Does it restart at 0? Or does it return an unusable value that crashes the program?

Ex Ovo Omnia
3297
Ex Ovo Omnia  

The function is encapsulated windows call. So the description match DWORD WINAPI GetTickCount(void);

skatt
187
skatt  
Ovo:

The function is encapsulated windows call. So the description match DWORD WINAPI GetTickCount(void);


Thanks.
Alain Verleyen
Moderator
32455
Alain Verleyen  
skatt:

I'd like to use GetTickCount(), but the documentation is so confusing. Please help.

According to the GetTickCount() documentation, it returns the "number of milliseconds that elapsed since the system start". Does that mean since the start of the expert program, the trading terminal, or the operating system?

Also, the documentation states that the unsigned integer is "overfilled" every 49.7 days? What does that mean? Does GetTickCount() stop changing at the highest value? Does it restart at 0? Or does it return an unusable value that crashes the program?

It's the operating system (computer) start.

GetTickCount() return an unsigned int, which max value is 4 294 967 295. It's ~49.7 days. If your computer is running for longer than that, GetTickCount() restarts from 0.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI  
Usually we reset back to zero once we get the ms value from last operations.
To add comments, please log in or register