"I did not sleep all night, thinking about you."
Translation:Я не спал всю ночь, думая о тебе.
Why is it всю ночь here? Does "sleeping" take an object and that makes it accusative?
For those who have experience with classical languages, it's a simple accusative of duration of time. To reemphasize, it's not the direct object.
Technically it's not an object, it's just a way to show the duration. Accusative can have several meanings, and it's not always indicating an object.
It's not an object because a verb can have a real direct object alongside with an Accusative to indicate time:
- Я чита́ла кни́гу всю ночь. 'I was reading [a/the] book all night.' (direct object is кни́гу)
- Я учи́л ру́сский всю ночь. 'I was learning Russian all night.' (direct object is ру́сский)
All imperfective verbs can be used with such accusatives. It can also be used with some perfective verbs (most notably verbs with the prefix про-, indicating finishing doing something for a period of time):
- Я прожила́ в Гонконге три го́да. 'I lived in Hong Kong for 3 years.' (roughly equal to Я жила́ в Гонко́нге три го́да.)
- Я пробыла́ в Улан-Ба́торе две неде́ли. 'I stayed in Ulaanbaatar for 2 weeks.' (roughly equal to Я была́ в Улан-Ба́торе две неде́ли.)
Ok, here we have an intransitive verb (спать) and "всю ночь" cannot considered a real object, but the accusative is always used with a verb and expresses the direct object. It's the ambiguity :-\
Same with "сто́ить" (to cost): "Дом сто́ит миллион."
Can we consider "всю ночь" and "миллион" direct objects when used with intransitive verbs? For ease of study, I suppose, yes.
"Я прожила́ в Гонконге три го́да." is another example. "прожила́" is a transitive verb: "прожила́ - кого/что? - три го́да" (целых три года прожила́). "Я прошёл десять километров."
It's just a matter of definitions, I think.
Yes, you're absolutely right.
There is another way to say that: "На протяжении всей ночи (all through the night) я не спал, думая о тебе."