-
Notifications
You must be signed in to change notification settings - Fork 130
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
Implement generic networking API #374
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't read through everything yet, I'm tired and need to go to bed and Idk if GitHub saves the progress lol!
Also just noticed, you should update the feature list in the readme. 😉 |
@@ -77,7 +75,7 @@ Time::~Time() | |||
static unsigned Tick() | |||
{ | |||
#ifdef _WIN32 | |||
return (unsigned)GetTickCount(); | |||
return (unsigned)SDL_GetTicks(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDL_GetTicks()
is slower than GetTickCount()
. I do not really see why switch it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, and GetTickCount
has the precision of 10-16 milliseconds which is garbage, whereas SDL_GetTicks
has precision of 1ms.
When I want to get time in milliseconds, I expect millisecond precision.
We may have two separate sets of functions, but I don't think it's worth it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do have two separate functions. Another one is just below - HiresTick()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what should I do in my code?
I have Time
, I need to get current milliseconds with 1ms precision without sudden wraparounds.
I'm too tired to think now, but if you give me working code, I'll use it.
sorry too lazy
will write docs later