The US president has dismissed his secretary of state's efforts to negotiate with North Korea as a “waste of time”.