This will work, although the 555 timer is based on exactly this. The error in the system would be determined by the tolerance of your resistor (and more specifically) the tolerance of your capacitor (which will be much larger than that of the resistor) and the accuracy threshold of the comparator.
You dont want to set the supply rail as the trip point. Practically it takes about 5 time constants for the RC to charge to its full value, but theoretically using (1-e^(t/CR)) it will never get there.
Look at a 555 timer circuit. This will be a more practical way of doing it and indeed is the way many engineers do it in reality