That's how I concentrate. You can reduce the number of breaths to 3 seconds, inhale and exhale for 3 seconds, and just concentrate on class. The principle is that your brain is in a state of insufficient oxygen supply and can only handle a single task without thinking too much. It also applies to homework.
Pay attention to normal breathing, the frequency should be slow, don't take a deep breath, and return to the original state immediately after listening to the class.