Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetTickCount should be unsigned #718

Closed
ghost opened this issue Apr 2, 2016 · 3 comments
Closed

GetTickCount should be unsigned #718

ghost opened this issue Apr 2, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 2, 2016

The call to win32api.GetTickCount() is returning a signed integer. It should be unsigned.

In particular, this causes problems when comparing it to, say, win32api.GetLastInputInfo() which returns an unsigned integer.

For more information, see this StackOverflow question: http://stackoverflow.com/questions/36312480/getlastinputinfo-and-gettickcount-are-not-consistent-with-each-other/

Reported by: oddthinking

Original Ticket: pywin32/bugs/718

@ghost ghost assigned ghost and unassigned ghost Oct 24, 2017
@fabiopedrosa
Copy link

This has been here for a while.

A quick solution:

tick_count = win32api.GetTickCount()
if tick_count < 0:
    tick_count+= 2**32

kxrob added a commit to kxrob/pywin32 that referenced this issue Sep 14, 2022
Uses Win API GetTickCount64() now - available since Vista
@kxrob
Copy link
Collaborator

kxrob commented Sep 14, 2022

Should return unsigned 64bit via #1946

@dreamflow
Copy link

this issue can be closed , because win32api.GetTickCount()
returns an unsigned 64bit integer , since the already released
version 305 of pywin32 .

@kxrob kxrob closed this as completed Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants