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

Implement generic networking API #374

Merged
merged 119 commits into from
Feb 12, 2022
Merged

Implement generic networking API #374

merged 119 commits into from
Feb 12, 2022

Conversation

eugeneko
Copy link
Member

@eugeneko eugeneko commented Feb 8, 2022

sorry too lazy
will write docs later

Copy link
Contributor

@niansa niansa left a 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!

Source/Tests/CommonUtils.h Outdated Show resolved Hide resolved
@niansa
Copy link
Contributor

niansa commented Feb 9, 2022

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();
Copy link
Member

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.

Copy link
Member Author

@eugeneko eugeneko Feb 10, 2022

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.

Copy link
Member

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().

Copy link
Member Author

@eugeneko eugeneko Feb 10, 2022

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.

@eugeneko eugeneko merged commit 3f9d831 into master Feb 12, 2022
@eugeneko eugeneko deleted the ek/network branch February 12, 2022 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants