Not if you haven't slept for at least six hours of that!
Ah, I think I see where the problem comes from. This passage was the subject of an erratum. Here's the original text:
A long rest is a period of extended downtime, at least 8 hours long, during which a character sleeps or performs light activity: reading, talking, eating, or standing watch for no more than 2 hours.
The "for no more than 2 hours" here seems to refer only to standing watch, which doesn't solve my problem, but it does remind me of how I felt about this erratum and makes me want to revise my response to you:
Not if you've spent more than 2 hours of that standing watch!