The given sentence contains an idiom because it contains an expression that is not meant to be taken literally. The expression "hit the books" does not mean to physically hit books; the expression is actually referring to studying. If the sentence were to be written literally, without the use of figurative language, the sentence would be, "After getting my report card, I knew it was time to study."