When a task has been completed during a space of time, the preposition “på” is used.
på | Jeg leste boka på to dager. | (I read (finished) the book in two days; it took two days to finish reading the entire book.) |
Jeg skrev ferdig eksamen på én time. | (I wrote (completed) the exam in one hour.; it took two hours to finish writing the exam.) | |
Vi vasket hele huset på to timer. | (We cleaned the whole house in two hours; it took two hours to finish cleaning.) |
Notice the difference in meaning between these examples:
Jeg leste boka i to timer. — This means that you read the book for two hours, but did not finish it.
Jeg leste boka på timer. — This means that you completed reading the entire book, and it took you two hours to do so.