How much decision time is given for tenure-track offers I've been applying for tenure track positions in computer science.

Recently I visited university X for an interview and they have hinted that they are likely to offer me a position after my second visit. Assuming all goes well, how much time can I expect to be given for deciding on that offer? 

I have also applied to several other places where any decision won't be made within the next few months. So my worry is that I might receive an offer from X "too soon" and hence won't be able to also take into account other opportunities.
In my experience, this depends somewhat on the level of the hire.  

A search for a full professor, named chair, department chair, or dean might result in a long period of negotiations with the candidate.  These kinds of searches often go "one candidate at a time" rather than bringing in all candidates for on campus interviews at nearly the same time.  Since the process is sequential, there's obviously more room to give the candidate time to consider the offer. 

However, when it comes to hiring a new assistant professor there are typically several reasonable candidates that were all interviewed on campus at about the same time.  If the university suspects that a top candidate isn't likely to take the offer they may make an offer with a short deadline in hopes that they can still get their second or third choice.  

In the past when I've made offers as a department chair (in mathematics) the offers were open for one or two weeks (with some possibility for an extension if there was negotiation going on.)  I have had to say "no" to requests for extended time to consider an offer.  

You can always ask for an extension of the time period, but I wouldn't count on getting one.  

I've also participated in searches in other academic departments.  The only reason for extended time on offers that I've ever seen was negotiation of startup packages- in the physical sciences and engineering new faculty often have very specific needs for laboratory space and equipment that have to be negotiated and this can take time.