package utils

import (
	"strconv"
	"strings"
)

//TimeStringToSecond 00:01:01 => 61s
func TimeStringToSecond(input string) int {
	times := strings.Split(input, ":")
	timeHour := times[0]
	timeMin := times[1]
	timeSecond := times[2]
	timeHourtInt, _ := strconv.Atoi(timeHour)
	timeMinInt, _ := strconv.Atoi(timeMin)
	timeSecondInt, _ := strconv.Atoi(timeSecond)
	return timeHourtInt*3600 + timeMinInt*60 + timeSecondInt
}
