started rating unit implementation

This commit is contained in:
Radu Ioan Fericean
2013-09-09 22:16:07 +03:00
parent 372fbe0e10
commit 1ee31ca004
4 changed files with 14 additions and 11 deletions

View File

@@ -66,3 +66,10 @@ func (cc *CallCost) GetStartTime() time.Time {
}
return cc.Timespans[0].TimeStart
}
func (cc *CallCost) GetTotalDuration() (td time.Duration) {
for _, ts := range cc.Timespans {
td += ts.GetDuration()
}
return
}