// ToDuration attempts to cast the Boolean to a Duration.
// The result is not checked for an overflow.
// Use the ToDurationChecked version of this method if you need to check for
// an overflow.
ToDuration attempts to cast the Boolean to a Duration.
The result is not checked for an overflow.
Use the ToDurationChecked version of this method if you need to check for
an overflow.
// ToDuration attempts to cast the Boolean to a Duration . // The result is not checked for an overflow . // Use the ToDurationChecked version of this method if you need to check for // an overflow .
func (t Boolean) ToDuration() Duration {
	if t {
		return Duration(1)
	}
	return Duration(0)
}
func ( t Boolean ) ToDuration ( ) Duration { if t { return Duration ( 1 ) } return Duration ( 0 ) }
ToDuration attempts to cast the Boolean to a Duration.
ToDuration attempts to cast the Boolean to a Duration .