mirror of
https://github.com/Xevion/banner.git
synced 2025-12-06 09:14:24 -06:00
Add class duration to time command output
This commit is contained in:
@@ -162,6 +162,10 @@ type NaiveTime struct {
|
||||
Minutes uint
|
||||
}
|
||||
|
||||
func (nt NaiveTime) Sub(other NaiveTime) time.Duration {
|
||||
return time.Hour*time.Duration(nt.Hours-other.Hours) + time.Minute*time.Duration(nt.Minutes-other.Minutes)
|
||||
}
|
||||
|
||||
func ParseNaiveTime(integer uint64) NaiveTime {
|
||||
minutes := uint(integer % 100)
|
||||
hours := uint(integer / 100)
|
||||
|
||||
Reference in New Issue
Block a user