Download MetaTrader 5
To add comments, please log in or register
Use MQL5 Cloud Network. It is secure!
skatt
186
skatt 2014.04.29 15:43 

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?

Ovo Cz
2955
Ovo Cz 2014.04.29 15:50  

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

skatt
186
skatt 2014.04.29 15:57  
Ovo:

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


Thanks.
Alain Verleyen
Moderator
28699
Alain Verleyen 2014.04.29 16:01  
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 2014.04.29 16:05  
Usually we reset back to zero once we get the ms value from last operations.
/
To add comments, please log in or register