I think you could do a query like this:
PHP Code:
$limit = 3600 * 12; // seconds in 12 hours
$result = $vbulletin->db->query_first("SELECT dateline FROM ".TABLE_PREFIX."thread WHERE postuserid = $userid ORDER BY dateline DESC");
if ($result && TIMENOW-$result['dateline'] < $limit)
{
// too soon
}
You could do it all in SQL by something like "WHERE UNIX_TIMESTAMP()-dateline < $limit", but this way if you want to display how long the user has to wait, you have the time of his last thread.