The tendency to feel bored and in-the-moment feelings of boredom had different relationships with the ability to sustain attention. The tendency to feel bored may reflect a motivation or ability to sustain attention over time. In contrast, in-the-moment boredom may be the result of difficulties sustaining attention. Finally, experimental tasks used to measure attention may unintentionally invoke negative emotions and this may complicate the interpretation of results from those tasks.
Hunter, A., & Eastwood, J. D. (2018). Does state boredom cause failures of attention? Examining the relations between trait boredom, state boredom, and sustained attention. Experimental Brain Research, 236(9), 2483-2492.