Skip to content

Fix current_time and put all the time getting code in one place#200

Open
Un1q32 wants to merge 12 commits into
ButterscotchRunner:mainfrom
Un1q32:time-refactor
Open

Fix current_time and put all the time getting code in one place#200
Un1q32 wants to merge 12 commits into
ButterscotchRunner:mainfrom
Un1q32:time-refactor

Conversation

@Un1q32
Copy link
Copy Markdown
Contributor

@Un1q32 Un1q32 commented Jun 6, 2026

current_time is supposed to return the time since game start, but in butterscotch, depending on the platform, current_time could return the time since the system booted, or the time since January 1st 1970. This fixes that.

This PR also centralizes all the different time getting code I know of into one place that the whole program can use, instead of having various platform dependent time getting implementations scattered across the codebase. This should make it easier to add a new platform with different time getting code since you don't have to duplicate your code across multiple different places.

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.

1 participant