code: func (d Duration) ToNumber() *MyDecimal {
  	sign, hours, minutes, seconds, fraction := splitDuration(d.Duration)
  	var (
  		s       string
  		signStr string
  	)
  
  	if sign < 0 {
  		signStr = "-"
  	}
  
  	if d.Fsp == 0 {
  		s = fmt.Sprintf("%s%02d%02d%02d", signStr, hours, minutes, seconds)
  	} else {
  		s = fmt.Sprintf("%s%02d%02d%02d.%s", signStr, hours, minutes, seconds, d.formatFrac(fraction))
  	}
  
  	// We skip checking error here because time formatted string can be parsed certainly.
  	dec := new(MyDecimal)
  	err := dec.FromString([]byte(s))
  	terror.Log(errors.Trace(err))
  	return dec
  }
docs: // ToNumber changes duration to number format.
  // e.g,
  // 10:10:10 -> 101010