Depending on the traffic, the drive to Tampaksiring from Ubud can be up to an hour - especially if you take advantage of the views. (I highly recommend you take advantage of the views!)
Some villas/hotel have drivers at their disposal to take guests to these places - with a small donation or tip for the driver. $40 for the hour there, the wait around while you explore, and the hour return is quite a good fare.
You can also hire your sarong from the temple if you don’t have one to take with you. about 8 years ago