Nowadays a few hours, depending on how occupied I am with some other non-sexual activity or work. When I was in the Army full time those periods could be longer. I also couldn't have sex for days at a time, due to lack of private living conditions during some periods. I have lots of privacy now.
Certain medications have also lowered my drive, and/or made me partly or fully impotent. Whenever that happens I tell the doctor that's not the med for me and insist on something different. I won't continue taking anything that prevents me from getting hard, or having an orgasm, or takes away my interest in sex.
I remember being put on some anti-depressant as a "companion therapy" for my epilepsy, because a large number of people with my type of seizures are also believed to develop depression, though I didn't seem to have any signs of it. It made me impotent and I stopped taking it.
As I said to the doctor: "I can't think of anything more likely to CAUSE a man to become depressed than to make him impotent! I think any anti-depressant that induces impotence is defeating its own purpose." He laughed and agreed I could do without, they'd just monitor me for depression, which I don't think I ever got. Or so the little voices tell me.