<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lưu trữ stopwatch - Tổng hợp những công cụ trực tuyến hữu ích | Tools Online</title>
	<atom:link href="https://ung-dung.com/tag/stopwatch/feed/" rel="self" type="application/rss+xml" />
	<link>https://ung-dung.com/tag/stopwatch/</link>
	<description></description>
	<lastBuildDate>Wed, 30 Sep 2026 05:39:11 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://ung-dung.com/wp-content/uploads/2019/05/favicon-150x150.png</url>
	<title>Lưu trữ stopwatch - Tổng hợp những công cụ trực tuyến hữu ích | Tools Online</title>
	<link>https://ung-dung.com/tag/stopwatch/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Đồng Hồ Bấm Giờ Online &#8211; Đếm Giờ Trực Tuyến</title>
		<link>https://ung-dung.com/stopwatch/</link>
					<comments>https://ung-dung.com/stopwatch/#respond</comments>
		
		<dc:creator><![CDATA[adminonline92]]></dc:creator>
		<pubDate>Fri, 27 Jun 2025 09:12:57 +0000</pubDate>
				<category><![CDATA[Công cụ]]></category>
		<category><![CDATA[stopwatch]]></category>
		<guid isPermaLink="false">https://ung-dung.com/?p=942</guid>

					<description><![CDATA[<p>Đồng hồ bấm giờ là công cụ giúp ghi lại quãng thời gian đã qua theo số giờ, phút và cả mini giây. Với thiết kế đơn giản và tối ưu cho cả điện thoại và máy tính, bạn có thể sử dụng công cụ dưới để theo dõi thời gian học tập, nấu ăn, [&#8230;]</p>
<p>Bài viết <a href="https://ung-dung.com/stopwatch/" data-wpel-link="internal">Đồng Hồ Bấm Giờ Online &#8211; Đếm Giờ Trực Tuyến</a> đã xuất hiện đầu tiên vào ngày <a href="https://ung-dung.com" data-wpel-link="internal">Tổng hợp những công cụ trực tuyến hữu ích | Tools Online</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"><strong>Đồng hồ bấm giờ </strong>là công cụ giúp ghi lại quãng thời gian đã qua theo số giờ, phút và cả mini giây. Với thiết kế đơn giản và tối ưu cho cả điện thoại và máy tính, bạn có thể sử dụng công cụ dưới để theo dõi thời gian học tập, nấu ăn, cơ khí, làm việc, giải trí,…</p>



<p class="wp-block-paragraph">Bạn sẽ không cần phải cài đặt thêm ứng dụng thứ ba trên máy tính Windows hay Macbook để sử dụng tính năng bấm giờ và cách sử dụng cũng khá đơn giản.</p>



<div id="omg-stopwatch" class="omg-stopwatch">
  <h2>Stopwatch</h2>

  <div class="omg-display" id="omg-display">00:00.00</div>

  <div class="omg-controls">
    <button type="button" id="omg-start-stop">Bắt đầu (S)</button>
    <button type="button" id="omg-lap" class="omg-secondary" disabled>
      Ngắt vòng (L)
    </button>
  </div>

  <div class="omg-keyboard-hint">
    Nhấn <kbd>S</kbd> Start/Stop •
    <kbd>R</kbd> Reset •
    <kbd>L</kbd> Lap •
    <kbd>C</kbd> Clear Laps
  </div>

  <div id="omg-export-container" class="omg-export-container" style="display:none;">
    <button type="button" id="omg-export-csv" class="omg-export-btn">
      Xuất CSV
    </button>
  </div>

  <ul class="omg-laps" id="omg-laps"></ul>

  <div class="omg-bottom-controls">
    <button type="button" id="omg-reset" class="omg-secondary">
      Đặt lại (R)
    </button>

    <button type="button" id="omg-clear-laps" class="omg-clear-btn">
      Xóa (C)
    </button>
  </div>
</div>

<style>
/* ================================
   OMG STOPWATCH
   ================================ */

#omg-stopwatch {
  --omg-main-color: #075aff;
  --omg-text-color: #333;
  --omg-bg-color: #ffffff;
  --omg-border-color: #e0e0e0;

  width: 100%;
  max-width: 500px;
  margin: 20px auto 25px;
  padding: 24px;
  box-sizing: border-box;

  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);

  text-align: center;
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;

  color: var(--omg-text-color);
  -webkit-font-smoothing: antialiased;
}

/* Title */

#omg-stopwatch h2 {
  margin: 0 0 8px;
  padding: 0;

  color: var(--omg-main-color);
  font-size: 2.3rem;
  line-height: 1.2;
  font-weight: 600;
}

/* Main display */

#omg-stopwatch .omg-display {
  margin: 20px 0 24px;

  color: var(--omg-main-color);

  font-size: clamp(3rem, 15vw, 4rem);
  font-weight: 300;
  line-height: 1.2;

  letter-spacing: 2px;

  font-variant-numeric: tabular-nums;
}

/* Buttons */

#omg-stopwatch button {
  cursor: pointer;

  border: 0;
  border-radius: 8px;

  padding: 10px 20px;

  background: var(--omg-main-color);
  color: #fff;

  font-size: 15px;
  font-weight: 500;

  letter-spacing: .3px;

  min-width: 110px;

  transition:
    transform .15s ease,
    opacity .15s ease,
    background .15s ease;
}

#omg-stopwatch button:hover {
  opacity: .92;
}

#omg-stopwatch button:active {
  transform: scale(.97);
}

#omg-stopwatch button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

#omg-stopwatch .omg-secondary {
  background: #f3f4f6;
  color: var(--omg-text-color);
}

/* Main controls */

#omg-stopwatch .omg-controls {
  display: flex;
  justify-content: center;
  align-items: center;

  gap: 12px;

  margin-bottom: 20px;

  flex-wrap: wrap;
}

/* Keyboard hint */

#omg-stopwatch .omg-keyboard-hint {
  display: none;

  margin: 16px 0;

  padding: 12px;

  background: #f8f9fa;

  border-radius: 7px;

  color: #888;

  font-size: 13px;
}

#omg-stopwatch kbd {
  display: inline-block;

  padding: 2px 6px;

  border: 1px solid #ccc;
  border-radius: 4px;

  background: #fff;

  color: #333;

  font-size: 12px;
  font-family: inherit;
}

/* Export */

#omg-stopwatch .omg-export-container {
  margin: 12px 0;
  text-align: center;
}

#omg-stopwatch .omg-export-btn {
  background: #4caf50;
  min-width: 110px;
}

#omg-stopwatch .omg-export-btn:hover {
  background: #43a047;
}

/* Lap list */

#omg-stopwatch .omg-laps {
  list-style: none;

  max-height: 220px;
  overflow-y: auto;

  margin: 16px 0;
  padding: 0;

  border-top: 1px solid var(--omg-border-color);

  scrollbar-width: thin;
  scrollbar-color:
    var(--omg-main-color)
    #f0f0f0;
}

/* Lap header */

#omg-stopwatch .omg-laps-header {
  display: flex;

  padding: 9px 12px;

  background: #f8f9fa;

  position: sticky;
  top: 0;
  z-index: 2;

  color: var(--omg-main-color);

  font-weight: 600;
  font-size: 14px;
}

#omg-stopwatch .omg-laps-header span:first-child {
  flex: 1;
  text-align: left;
}

#omg-stopwatch .omg-laps-header span:nth-child(2),
#omg-stopwatch .omg-laps-header span:nth-child(3) {
  flex: 2;
  text-align: right;
}

/* Lap item */

#omg-stopwatch .omg-lap-item {
  display: flex;
  align-items: center;

  padding: 9px 12px;

  border-bottom: 1px solid var(--omg-border-color);

  font-size: 14px;
}

#omg-stopwatch .omg-lap-number {
  flex: 1;
  text-align: left;
}

#omg-stopwatch .omg-lap-time {
  flex: 2;
  text-align: right;

  font-variant-numeric: tabular-nums;
}

#omg-stopwatch .omg-lap-item.omg-fastest .omg-lap-time {
  color: #28a745;
  font-weight: 600;
}

#omg-stopwatch .omg-lap-item.omg-slowest .omg-lap-time {
  color: #dc3545;
  font-weight: 600;
}

/* Scrollbar */

#omg-stopwatch .omg-laps::-webkit-scrollbar {
  width: 6px;
}

#omg-stopwatch .omg-laps::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

#omg-stopwatch .omg-laps::-webkit-scrollbar-thumb {
  background: var(--omg-main-color);
  border-radius: 3px;
}

/* Bottom buttons */

#omg-stopwatch .omg-bottom-controls {
  display: flex;

  width: 100%;
  max-width: 320px;

  margin: 20px auto 0;

  gap: 10px;
}

#omg-stopwatch .omg-bottom-controls button {
  flex: 1;
  min-width: 0;
}

/* Mobile */

@media (max-width: 480px) {

  #omg-stopwatch {
    margin: 10px auto 20px;
    padding: 20px 16px;
    border-radius: 12px;
  }

  #omg-stopwatch h2 {
    font-size: 2rem;
  }

  #omg-stopwatch .omg-display {
    font-size: 3rem;
    margin: 14px 0 20px;
  }

  #omg-stopwatch .omg-controls {
    gap: 8px;
  }

  #omg-stopwatch button {
    padding: 10px 14px;
    font-size: 14px;
    min-width: 100px;
  }

  #omg-stopwatch .omg-lap-item,
  #omg-stopwatch .omg-laps-header {
    padding-left: 8px;
    padding-right: 8px;
    font-size: 13px;
  }
}

/* Desktop */

@media (min-width: 768px) {

  #omg-stopwatch .omg-keyboard-hint {
    display: block;
  }

}
</style>

<script>
(function () {

  "use strict";

  /* ================================
     ELEMENTS
     ================================ */

  const display =
    document.getElementById("omg-display");

  const startStopBtn =
    document.getElementById("omg-start-stop");

  const lapBtn =
    document.getElementById("omg-lap");

  const resetBtn =
    document.getElementById("omg-reset");

  const clearLapsBtn =
    document.getElementById("omg-clear-laps");

  const exportCsvBtn =
    document.getElementById("omg-export-csv");

  const exportContainer =
    document.getElementById("omg-export-container");

  const lapsList =
    document.getElementById("omg-laps");


  /* ================================
     VARIABLES
     ================================ */

  let startTime = 0;

  let elapsedTime = 0;

  let timerInterval = null;

  let isRunning = false;

  let lapCount = 0;

  let lapTimes = [];


  /* ================================
     FORMAT TIME
     ================================ */

  function formatTime(ms) {

    const totalSeconds =
      Math.floor(ms / 1000);

    const minutes =
      Math.floor(totalSeconds / 60)
        .toString()
        .padStart(2, "0");

    const seconds =
      (totalSeconds % 60)
        .toString()
        .padStart(2, "0");

    const milliseconds =
      Math.floor((ms % 1000) / 10)
        .toString()
        .padStart(2, "0");

    return (
      minutes +
      ":" +
      seconds +
      "." +
      milliseconds
    );
  }


  /* ================================
     DISPLAY
     ================================ */

  function updateDisplay() {

    display.textContent =
      formatTime(elapsedTime);

  }


  /* ================================
     UPDATE TIMER
     ================================ */

  function updateTimer() {

    elapsedTime =
      Date.now() - startTime;

    updateDisplay();

  }


  /* ================================
     START / STOP
     ================================ */

  function startTimer() {

    if (!isRunning) {

      startTime =
        Date.now() - elapsedTime;

      timerInterval =
        setInterval(updateTimer, 16);

      isRunning = true;

      startStopBtn.textContent =
        "Dừng (S)";

      lapBtn.disabled = false;

    } else {

      stopTimer();

    }

  }


  /* ================================
     STOP
     ================================ */

  function stopTimer() {

    clearInterval(timerInterval);

    timerInterval = null;

    isRunning = false;

    startStopBtn.textContent =
      "Bắt đầu (S)";

  }


  /* ================================
     ADD LAP
     ================================ */

  function addLap() {

    if (!isRunning) {
      return;
    }

    lapCount++;

    const previousTotal =
      lapTimes.length
        ? lapTimes[lapTimes.length - 1].totalTime
        : 0;

    const lapTime =
      elapsedTime - previousTotal;

    lapTimes.push({
      lap: lapCount,
      time: lapTime,
      totalTime: elapsedTime
    });

    updateLapsList();

  }


  /* ================================
     DISPLAY LAPS
     ================================ */

  function updateLapsList() {

    lapsList.innerHTML = "";

    if (lapTimes.length === 0) {

      exportContainer.style.display =
        "none";

      return;

    }


    const durations =
      lapTimes.map(function (lap) {
        return lap.time;
      });


    const fastestLap =
      Math.min.apply(null, durations);

    const slowestLap =
      Math.max.apply(null, durations);


    /* Header */

    const header =
      document.createElement("li");

    header.className =
      "omg-laps-header";

    header.innerHTML = `
      <span>TT</span>
      <span>Ngắt vòng</span>
      <span>Tổng Time</span>
    `;

    lapsList.appendChild(header);


    /* Laps */

    lapTimes.forEach(function (lap) {

      const item =
        document.createElement("li");

      item.className =
        "omg-lap-item";


      if (
        lapTimes.length > 1 &&
        lap.time === fastestLap
      ) {

        item.classList.add(
          "omg-fastest"
        );

      } else if (
        lapTimes.length > 1 &&
        lap.time === slowestLap
      ) {

        item.classList.add(
          "omg-slowest"
        );

      }


      item.innerHTML = `
        <span class="omg-lap-number">
          ${lap.lap}
        </span>

        <span class="omg-lap-time">
          ${formatTime(lap.time)}
        </span>

        <span class="omg-lap-time">
          ${formatTime(lap.totalTime)}
        </span>
      `;


      lapsList.appendChild(item);

    });


    lapsList.scrollTop =
      lapsList.scrollHeight;


    exportContainer.style.display =
      "block";

  }


  /* ================================
     RESET
     ================================ */

  function resetTimer() {

    stopTimer();

    elapsedTime = 0;

    lapCount = 0;

    lapTimes = [];

    updateDisplay();

    lapBtn.disabled = true;

    lapsList.innerHTML = "";

    exportContainer.style.display =
      "none";

  }


  /* ================================
     CLEAR LAPS
     ================================ */

  function clearLaps() {

    lapCount = 0;

    lapTimes = [];

    lapsList.innerHTML = "";

    exportContainer.style.display =
      "none";

  }


  /* ================================
     EXPORT CSV
     ================================ */

  function exportToCsv() {

    if (lapTimes.length === 0) {
      return;
    }


    let csv =
      "Lap,Time (ms),Time (formatted)\n";


    lapTimes.forEach(function (lap) {

      csv +=
        lap.lap +
        "," +
        lap.time +
        "," +
        formatTime(lap.time) +
        "\n";

    });


    const blob =
      new Blob(
        [csv],
        {
          type:
            "text/csv;charset=utf-8;"
        }
      );


    const url =
      URL.createObjectURL(blob);


    const link =
      document.createElement("a");

    link.href = url;

    link.download =
      "laps-" +
      new Date()
        .toISOString()
        .slice(0, 10) +
      ".csv";

    link.style.display = "none";


    document.body.appendChild(link);

    link.click();

    document.body.removeChild(link);


    setTimeout(function () {

      URL.revokeObjectURL(url);

    }, 100);

  }


  /* ================================
     KEYBOARD
     ================================ */

  function handleKeyDown(event) {

    const target =
      event.target;


    if (
      target &&
      (
        target.tagName === "INPUT" ||
        target.tagName === "TEXTAREA" ||
        target.isContentEditable
      )
    ) {

      return;

    }


    const key =
      event.key.toLowerCase();


    if (key === "s") {

      event.preventDefault();

      startTimer();

    }

    else if (key === "r") {

      event.preventDefault();

      resetTimer();

    }

    else if (key === "l") {

      event.preventDefault();

      if (isRunning) {
        addLap();
      }

    }

    else if (key === "c") {

      event.preventDefault();

      clearLaps();

    }

  }


  /* ================================
     EVENTS
     ================================ */

  startStopBtn.addEventListener(
    "click",
    startTimer
  );

  lapBtn.addEventListener(
    "click",
    addLap
  );

  resetBtn.addEventListener(
    "click",
    resetTimer
  );

  clearLapsBtn.addEventListener(
    "click",
    clearLaps
  );

  exportCsvBtn.addEventListener(
    "click",
    exportToCsv
  );

  document.addEventListener(
    "keydown",
    handleKeyDown
  );


  /* ================================
     INITIALIZE
     ================================ */

  updateDisplay();

})();
</script>



<h2 id="huong-dan-su-dung" class="wp-block-heading">Hướng Dẫn Sử Dụng</h2>



<p class="wp-block-paragraph">Bước 1: Nhấn nút <strong>Start</strong> để bắt đầu.</p>



<p class="wp-block-paragraph">Bước 2: Nếu muốn ghi nhận một hoặc nhiều thời điểm của mốc thời gian, chỉ cần nhất nút <strong>Lap.</strong></p>



<figure class="wp-block-image aligncenter size-full is-resized"><img fetchpriority="high" decoding="async" width="1128" height="1272" src="https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1.webp" alt="Stopwatch" class="wp-image-950" style="width:400px;height:auto" srcset="https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1.webp 1128w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-266x300.webp 266w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-908x1024.webp 908w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-768x866.webp 768w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-1362x1536.webp 1362w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-1816x2048.webp 1816w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-133x150.webp 133w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-100x113.webp 100w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-310x350.webp 310w, https://ung-dung.com/wp-content/uploads/2025/06/Stopwatch-1-788x888.webp 788w" sizes="(max-width: 1128px) 100vw, 1128px" /></figure>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Mỗi lần nhấn vào nút Lap là một thời điểm sẽ được tạo ra. Tiếp tục nhấn nút <strong>Export CSV</strong> nếu bạn cần xuất dữ liệu này để sử dụng. Chọn <strong>Clear</strong> để xóa hết danh sách thời gian được tạo.</p>
</blockquote>



<p class="wp-block-paragraph">Bước 3: Nhấn <strong>Stop </strong>để tạm dừng công cụ hoặc có thể nhấn nú<strong>t Reset </strong>để thực hiện lại từ đầu.</p>



<h2 id="phim-tat-nhanh" class="wp-block-heading">Phím Tắt Nhanh</h2>



<p class="wp-block-paragraph">Để tối ưu hơn, chúng tôi đã tích hợp thêm một vài phím tắt có thể giúp bạn sử dụng công cụ một cách linh hoạt hơn.</p>



<ul class="wp-block-list">
<li><strong>Nhấn phím S:</strong> Start/Stop công cụ bấm giờ</li>



<li><strong>Nhấn phím L: </strong>Để ghi nhận thời gian mong muốn, mỗi lần nhấn là mỗi lần thời gian sẽ được thêm vào danh sách.</li>



<li><strong>Phím C:</strong> Để xóa toàn bộ danh sách thời gian được ghi nhận</li>



<li><strong>Phím R: </strong>Khởi động lại công cụ từ đầu.</li>
</ul>



<p class="wp-block-paragraph">Công cụ bấm giờ này đã được chúng tôi hoàn thiện với sự tối ưu tốt nhất cho các thiết bị phổ biến hiện nay, bao gồm Android, iOS, Windows và Macbook. Tuy nhiên, nếu bạn phát hiện lỗi hoặc cần cải thiện thêm điều gì đó &#8211; Hãy cho chúng tôi biết thông qua bình luận dưới đây nhé!</p>
<p>Bài viết <a href="https://ung-dung.com/stopwatch/" data-wpel-link="internal">Đồng Hồ Bấm Giờ Online &#8211; Đếm Giờ Trực Tuyến</a> đã xuất hiện đầu tiên vào ngày <a href="https://ung-dung.com" data-wpel-link="internal">Tổng hợp những công cụ trực tuyến hữu ích | Tools Online</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://ung-dung.com/stopwatch/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
