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

 

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?

 

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

 
Ovo:

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


Thanks.
 
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.

 
Usually we reset back to zero once we get the ms value from last operations.
Reason: