cleverbot.go
func (s *Session) TimeElapsed() time.Duration {
	s.mu.Lock()
	defer s.mu.Unlock()
	if v, ok := s.Decoded["time_elapsed"].(string); ok {
		if dur, err := time.ParseDuration(v + "s"); err == nil {
			return dur
		}
	}
	return time.Second * -1
}
func (s *Session) TimeElapsed() time.Duration {
	s.mu.Lock()
	defer s.mu.Unlock()
	if v, ok := s.Decoded["time_elapsed"].(string); ok {
		if dur, err := time.ParseDuration(v + "s"); err == nil {
			return dur
		}
	}
	return time.Second * -1
}
func ( s * Session ) TimeElapsed ( ) time . Duration { s . mu . Lock ( ) defer s . mu . Unlock ( ) if v , ok := s . Decoded [ " " ] . ( string ) ; ok { if dur , err := time . ParseDuration ( v + " " ) ; err == nil { return dur } } return time . Second * - 1 }
// TimeElapsed returns approximate duration since conversation started.
// Returns -1 seconds if time_elapsed is not found or parsing failed.
TimeElapsed returns approximate duration since conversation started . Returns - 1 seconds if time_elapsed is not found or parsing failed .