Skip to content

Commit

Permalink
fix duration
Browse files Browse the repository at this point in the history
  • Loading branch information
Flaque committed Sep 26, 2024
1 parent b24658a commit d6e4a30
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/buy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,8 @@ function confirmPlaceOrderMessage(options: BuyOptions) {
timeDescription = `from ${startAtLabel} (${c.green(fromNowTime)}) until ${endsAtLabel}`;
}

const durationInSeconds = Math.ceil(
(options.endsAt.getTime() - options.startsAt.getTime()) / 1000,
);
const durationInSeconds =
options.endsAt.getTime() / 1000 - options.startsAt.getTime() / 1000;
const pricePerGPUHour = totalPriceToPricePerGPUHour(
options.priceCenticents,
durationInSeconds,
Expand Down

0 comments on commit d6e4a30

Please sign in to comment.