<p>Could someone tell me what the units the <code>SetTimeout(int)</code> method in the <code>ICriteria</code> interface uses?<br>
Is it milliseconds, seconds, minutes or other?</p>

[{'answer_id': 33972, 'author': 'David Crow', 'author_id': 2783, 'author_profile': 'https://Stackoverflow.com/users/2783', 'pm_score': 3, 'selected': False, 'text': '<p>I think it\'s seconds.  The NHibernate API closely mirrors Hibernate Core for Java, where the <a href="http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Criteria.html#setTimeout(int)" rel="nofollow noreferrer">Criteria.setTimeout(int)</a> method uses seconds as the units (see also <a href="http://java.sun.com/j2se/1.3/docs/api/java/sql/Statement.html#setQueryTimeout(int)" rel="nofollow noreferrer">Statement.setQueryTimeout(int)</a>).</p>\n\n<p>Also, after looking at some NHibernate source, it appears that it\'s using that value to set the timeout for the underlying ADO.NET query, which uses seconds.</p>\n'}, {'answer_id': 33982, 'author': 'Rob', 'author_id': 3542, 'author_profile': 'https://Stackoverflow.com/users/3542', 'pm_score': 6, 'selected': True, 'text': '<p>A little bit of poking around suggests that it could be seconds:</p>\n\n<p>Assuming that ICriteria is the same as the Criteria interface in Hibernate core, then the JavaDoc for <a href="http://www.hibernate.org/hib_docs/v3/api/org/hibernate/Criteria.html#setTimeout(int)" rel="noreferrer">org.hibernate.Criteria</a> provides a hint - the "see also" link to <a href="http://java.sun.com/j2se/1.3/docs/api/java/sql/Statement.html#setQueryTimeout(int)" rel="noreferrer">java.sql.Statement.setQueryTimeout()</a>. The latter refers to its timeout parameter as seconds.</p>\n\n<p>Assuming that the NHibernate implementation follows the implied contract of that method, then that should be fine. However, for peace of mind\'s sake, I went and looked for some NHibernate specific stuff. There are various references to CommandTimeout; for example, <a href="http://svn.quanticosoft.com/devage/Eucalypto/Eucalypto1/Eucalypto/Transactions/TransactionScope.cs" rel="noreferrer">here</a>, related to NHibernate. Sure enough, the <a href="http://msdn.microsoft.com/en-us/library/ms678265(VS.85).aspx" rel="noreferrer">documentation for CommandTimeout</a> states that it\'s seconds.</p>\n\n<p>I almost didn\'t post the above, because I don\'t know the answer outright, and can\'t find any concrete documentation - but since there is so little on the issue, I figured it couldn\'t hurt to present these findings.</p>\n'}]
['https://Stackoverflow.com/questions/33955', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/493/']