Can we use "Now" (not until now or until then) in past tense sentences
I wrote this to my friends a few days ago:
(1) It used to take 5 seconds for me to reach Youtube, now it only took me 2 seconds to do it.
I used "now" to refer to the moment when I installed a faster connection hardware. I come up with this question, because I think the use of "now" in sentence 1 is informal and it is like a colloquial conversation.
I am sorry my friends. Back in those days I was taught (by my English teachers, non-native speaker) that now must use in present tense, so the use of now sometimes confuses me.
The wording in the example you give sounds a bit odd to me. As Fred Bailey argues in his answer, "now it takes me only 2 seconds to get there" better conveys the idea that the particular task in question has a duration of 2 seconds any time you choose to perform it—if that's the point you are trying to make.
On the other hand, I don't see any problem with using "now" in the course of a narrative of past events—as, for example, in this extract from Anthony Trollope, The Way We Live Now (1875):
But the journey to Mexico was no longer open to him. H had repudiated the proposition and had quarreled with Melmotte. It was necessary that he should immediately take some further steps in regard to Mrs. Hurtle. Twice lately he had gone to Islington determined that he would see that lady for the last time. Then he had taken her to Lowestoft, and had been equally firm in his resolution that he would there put an end to his present bonds. Now he had promised to go again to Islington;—and was aware that if he failed to keep his promise, she would come to him. In this way there would never be an end to it.
Your example has much in common with Trollope's. The function of now in his paragraph is to bring the reader up to the moment being described in a narrative set in the past. Your example does something similar, describing what "used to" be the duration of the pause before you reached YouTube, followed by what was "now" the length of the pause. But in typical spoken or written English, we would express the idea either without using now at all:
It used to take 5 seconds for me to reach YouTube, but after upgrading the connection hardware I could get there in only 2 seconds.
or with now used to refer to the present moment:
It used to take 5 seconds for me to reach YouTube, but now I can get there in only 2 seconds.
Notice that the first of the two rewritten versions above leaves open the possibility that the improvement to 2 seconds of waiting time may not still be in effect, whereas in the second version it explicitly does remain in effect. Your wording involves the same uncertainty about present wait time as my first revision does. If you said
Whereas it used to take 5 seconds for me to reach YouTube [before the hardware upgrade], it now took me only 2 seconds to do it.
I wouldn't dispute the sentence's grammatical correctness, but I would still find it oddly focused on the first time you tested the duration of the pause after installing the new hardware, rather than on describing a permanent (or long-term) change in the pause time.
You can hardly set yourself more into the present than by using the word now. I would write your sentence like this:
It used to take five seconds for me to reach YouTube, but now it takes me only two seconds.