Skip to content

Commit

Permalink
[Feat/#81] HomViewModel - 앱별 사용량 계산 함수 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
boyeon0119 committed Jan 15, 2024
1 parent c444009 commit 69d103a
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ import Foundation

struct TotalAppUsingTimeDataModel {
var onboardingTotalGoalTime: Float
var totalAppUsingTime: Float
var progressValue: Float
var totalAppRemainedTime: Float
var isFailed: Bool
}

static func calculateTotalUsageTime(data: [AppUsingTimeModel]) -> Int {
return data.reduce(0) { $0 + Int($1.usedTime) }
}

}

0 comments on commit 69d103a

Please sign in to comment.