code: func calcTimeDiff(t1, t2 MysqlTime, sign int) (seconds, microseconds int, neg bool) {
  	days := calcDaynr(t1.Year(), t1.Month(), t1.Day())
  	days2 := calcDaynr(t2.Year(), t2.Month(), t2.Day())
  	days -= sign * days2
  
  	tmp := (int64(days)*secondsIn24Hour+
  		int64(t1.Hour())*3600+int64(t1.Minute())*60+
  		int64(t1.Second())-
  		int64(sign)*(int64(t2.Hour())*3600+int64(t2.Minute())*60+
  			int64(t2.Second())))*
  		1e6 +
  		int64(t1.Microsecond()) - int64(sign)*int64(t2.Microsecond())
  
  	if tmp < 0 {
  		tmp = -tmp
  		neg = true
  	}
  	seconds = int(tmp / 1e6)
  	microseconds = int(tmp % 1e6)
  	return
  }
docs: // calcTimeDiff calculates difference between two datetime values as seconds + microseconds.
  // t1 and t2 should be TIME/DATE/DATETIME value.
  // sign can be +1 or -1, and t2 is preprocessed with sign first.