Skip to content

fix: properly calculate deadline, use chrono for calculating timestamps#123

Merged
Evalir merged 6 commits into
mainfrom
evalir/builder-debug-stuff
Jul 7, 2025
Merged

fix: properly calculate deadline, use chrono for calculating timestamps#123
Evalir merged 6 commits into
mainfrom
evalir/builder-debug-stuff

Conversation

@Evalir

@Evalir Evalir commented Jul 2, 2025

Copy link
Copy Markdown
Member

We were calculating the deadline by subtracting from an Instant::now(), which we shouldn't do. We now simply subtract the buffer from the remaining time in the slot and add the result to the current instant instead.

This also switches to using chrono for anything regarding timestamps instead of using std, for parity with the slot calculator. Everything else uses Instant or Duration already.

Closes ENG-1167
Closes ENG-1019

Evalir commented Jul 2, 2025

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Comment thread src/tasks/block/sim.rs Outdated
@Evalir Evalir changed the title chore: use chrono, debug fix: properly calculate deadline, use chrono for calculating timestamps Jul 3, 2025
@Evalir
Evalir marked this pull request as ready for review July 3, 2025 13:48
@Evalir
Evalir requested a review from dylanlott as a code owner July 3, 2025 13:48
@Evalir
Evalir requested review from prestwich and rswanson July 3, 2025 13:48
@prestwich
prestwich force-pushed the evalir/builder-debug-stuff branch from fa955fe to 9da0142 Compare July 3, 2025 23:50

@Evalir Evalir left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just one nit

Comment thread src/tasks/submit/task.rs Outdated

@prestwich prestwich left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commit your suggestion and then go ahead and merge :)

@Evalir
Evalir merged commit bfaeedd into main Jul 7, 2025
6 checks passed
@Evalir
Evalir deleted the evalir/builder-debug-stuff branch July 7, 2025 16:42
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.

2 participants