IME transit time between the two can be anywhere from 30 minutes to 90 minutes depending on traffic.
Immigration at JFK can also sometimes be over an hour.
You only need an inbound delay, coupled with bad traffic, to make 3 hours go very quickly. I wouldn't do it unless absolutely necessary.
Others may disagree and YMMV.