Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Commit 334a47c

Browse files
committed
feat: CostPeriod.power_multiplier method
1 parent 7809502 commit 334a47c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/costs.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,10 @@ impl CostPeriod {
260260
self.load
261261
}
262262

263+
pub const fn power_multiplier(&self) -> f64 {
264+
1. / self.divide_kw_by as f64
265+
}
266+
263267
pub fn matches(&self, timestamp: DateTime<Tz>) -> bool {
264268
for include in self.include_period_types() {
265269
if !include.matches(timestamp) {

0 commit comments

Comments
 (0)