<script>
   setInterval(function() {
      updateCounter();
   }, 1000*1); // 1000*1 = 1000 demek zaten *1 gereksiz olmuş. bu süreyi 3000'e çıkartın.
   function updateCounter() {
      $.ajax({
         url: 'ajax-mesaj.php',
         async:false, // burayı ekleyin.
         success: function(output) {
            $('#ajaxmesaj').html(output);
         }
      });
   }
</script>