You watch the clock on the wall
hehe j/k
(There may be a shorter way... but I got this)
What you do is...
1) Flip both and let the 4 minute run out then stop the 7 minute... it now has 3 minutes left in it qnd the other has 4.
2) Flip the 4 and continue until the 3 minutes run out and stop the 4... this leaves 7 minutes in one and 1 minute in the other.
3) Flip the 7 and keep it going until the 1 minute is up and stop... this leaves 6 minutes and 4 minutes.
4) Flip the 4 and let the 6 run until the 4 is up... this leaves a 2 and a 4 minute.
5) Throw out the 4 minute glass
6) Let the remaining 2 minutes run out of the other glass then flip it right away and let it go for the full 7 minutes... 7+2=9