timeoffset.go raw

   1  package util
   2  
   3  import "time"
   4  
   5  // GetSecondsAhead returns the difference in time, of the second ahead of the first
   6  func GetSecondsAhead(first, second time.Time) int {
   7  	return int(second.Sub(first).Truncate(time.Second) / time.Second)
   8  }
   9