Skip to content

Commit

Permalink
feat: now "7 days" will be created for std::chrono::weeks instead o…
Browse files Browse the repository at this point in the history
…f a quantity in seconds
  • Loading branch information
mpusz committed Aug 15, 2023
1 parent 1d822d0 commit af26c48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utility/include/mp-units/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ template<typename Period>
return hour;
else if constexpr (is_same_v<Period, std::chrono::days::period>)
return day;
else if constexpr (is_same_v<Period, std::chrono::weeks::period>)
return mag<7> * day;
else
return mag<ratio{Period::num, Period::den}> * second;
}
Expand Down

0 comments on commit af26c48

Please sign in to comment.