# dunno why you need all that... use this:

proc timefmt {secs} {

	if { ![string is integer -strict $secs] } {
		error "First argument must be integer."
	}
	return [duration $secs];
}