Many understand Daniel to be urging the king to repent in order to avert the judgment altogether, but as E J Young says, there is nothing in the text to support this. Yes, repentance leads to the averting of judgment, but here it is too late for that.