Initializing, please wait a moment

Thoi gian bang mili giay: don vi, cac chuyen doi va noi no xuat hien

Thoi gian bang mili giay la mot so don gian trong do mot giay bang 1000 mili giay (ms). Gia tri mang hai y nghia: mot thoi luong, nhu hoat anh 300 ms, hoac mot thoi diem, nhu dau thoi gian epoch 13 chu so. Biet ban dang doc cai nao giup tranh mot ngay lech hang thap ky.

Cau tra loi 30 giay. Mili giay (ms) la phan nghin cua mot giay: 1 s = 1000 ms, 1 phut = 60000 ms, 1 gio = 3600000 ms. Mot thoi luong bang ms la so dem cua nhung phan nghin do. Mot thoi diem bang ms la dau thoi gian epoch - so mili giay ke tu 1970-01-01T00:00:00 UTC, hom nay la mot so nguyen 13 chu so gan 1779645000000. De doc thoi diem hien tai, mo cong cu thoi gian bang mili giay; de chuyen doi mot thoi luong, dung bang ben duoi.

Last reviewed: 2026-07-03

Hai y nghia: mot thoi luong hoac mot thoi diem

Cung mot cum tu chi den hai dai luong khac nhau. Mot thoi luong la thoi gian mot viec keo dai: mot timeout 250 ms, mot khung hoat anh 16.7 ms, mot vong nhan gui mang 200 ms. No la mot do dai khong gan ngay bat dau. Mot thoi diem la mot diem duy nhat tren dong ho, viet duoi dang so dem mili giay ke tu mot goc co dinh - epoch Unix tai 1970-01-01T00:00:00 UTC. Hom nay so dem do la mot so nguyen 13 chu so. Doc mot thoi luong nhu the no la mot thoi diem, hoac nguoc lai, la loi thuong gap nhat voi gia tri mili giay.

Neu ban muon thoi diem hien tai bang mili giay, gia tri la mot so nguyen epoch truc tiep: mo cong cu thoi gian bang mili giay de sao chep no, va xem current time in milliseconds de biet cach dung no trong mot dong log hoac mot lenh goi API. Neu ban da co mot thoi diem va muon mot ngay de doc, dan vao mili giay thanh ngay hoac doc convert milliseconds to date.

Chuyen doi cac thoi luong thong dung sang mili giay

Moi thoi luong bang mili giay la so giay nhan voi 1000. Cac gia tri ben duoi la nhung gia tri ban dung nhieu nhat khi dat mot timer, mot thoi gian song cache, hoac mot hoat anh.

Thoi luongBang mili giay
1 giay1000 ms
1 phut60000 ms
1 gio3600000 ms
1 ngay86400000 ms
1 tuan604800000 ms
1 khung o 60 fpskhoang 16.67 ms
1 khung o 30 fpskhoang 33.33 ms

Noi thoi gian bang ms xuat hien trong ma nguon

Mili giay la don vi mac dinh cho cac thoi gian ngan trong trinh duyet. setTimeout(fn, 250) va setInterval(fn, 1000) nhan mot do tre bang mili giay, nen 250 la mot phan tu giay va 1000 la mot giay. Cac chuyen tiep va hoat anh CSS chap nhan ca ms lan s, nen 0.3s va 300ms co cung do dai. performance.now() tra ve mot so dem mili giay co phan le de do mot thao tac mat bao lau. Va Date.now() tra ve thoi diem hien tai bang mili giay, gia tri epoch, khong phai mot thoi luong. Mot luu y: currentTime cua mot phan tu media HTML tinh bang giay, khong phai mili giay, nen nhan voi 1000 truoc khi so sanh voi mot timer bang mili giay.

Chuyen doi mot thoi luong sang hoac tu mili giay

  1. Giay sang mili giay: nhan voi 1000. Nen 2.5 giay la 2500 ms.
  2. Mili giay sang giay: chia cho 1000. Nen 250 ms la 0.25 giay.
  3. Phut, gio va ngay: dung bang o tren, hoac nhan so giay voi 1000. Nen 5 phut la 300 giay, tuc la 300000 ms.
  4. Voi mot thoi diem thay vi mot thoi luong, mot gia tri epoch 13 chu so, dan vao mili giay thanh ngay de xem ngay lich, va kiem tra milliseconds to date: UTC vs local time cho phan hien thi mui gio.

Cau hoi thuong gap

Co bao nhieu mili giay trong mot giay?

Co 1000 mili giay trong mot giay. Tu do, mot phut la 60000 ms, mot gio la 3600000 ms, va mot ngay la 86400000 ms. Moi thoi luong bang mili giay la so giay nhan voi 1000.

Thoi gian bang ms co giong dau thoi gian Unix khong?

Chi khi gia tri la mot thoi diem. Mot thoi luong nhu 300 ms la mot do dai va khong gan ngay. Mot dau thoi gian Unix bang mili giay la mot thoi diem: so dem mili giay ke tu 1970-01-01T00:00:00 UTC, hom nay la mot so nguyen 13 chu so. Voi y nghia do, xem current time in milliseconds.

Tai sao timer va hoat anh dung mili giay?

Thoi gian duoi mot giay rat pho bien, va mili giay cho do phan giai du ma khong can so thap phan. Mot do tre 250 ms min hon mot do tre 1 giay, va setTimeout, setInterval cung cac thoi luong hoat anh CSS deu chap nhan gia tri mili giay truc tiep.

Khac biet giua gia tri 10 chu so va 13 chu so la gi?

Mot thoi diem bang giay la mot so 10 chu so; cung thoi diem do bang mili giay la so do nhan 1000, tuc la 13 chu so. Dua mot gia tri 13 chu so bang mili giay vao mot bo phan tich mong doi giay se cho ra mot ngay rat xa trong tuong lai, khoang nam 58000. Kiem tra so chu so truoc khi chuyen doi.

Lam sao de lay thoi gian hien tai bang ms ngay bay gio?

Goi Date.now() trong JavaScript, hoac mo cong cu thoi gian bang mili giay de doc va sao chep gia tri epoch truc tiep ma khong can cai dat. So thay doi moi lan doc vi no theo dong ho truc tiep.

Why trust these tools

  • Ten-plus years of web tooling. The freetoolonline editorial team has shipped browser-based utilities since 2015. The goal has never changed: get you to a working output fast, without an install.
  • No install, no sign-up. Open a tool and get a working output in seconds - nothing to download and no account to create. Tools that need heavy processing run it on our service, so even a low-powered machine gets the job done.
  • Analytics stops at the page view. We measure which pages get visited, not what you type or upload inside a tool. There is nothing to sign in to and no profile is attached to your input.
  • Open-source core components. The processing engines underneath (libheif, libde265, pdf-lib, terser, clean-css, ffmpeg.wasm, and others) are public and audit-able. We link to each one in its tool page's footer.
  • Free, with or without ads. All tools are fully functional without sign-up. The Disable Ads button in the header is always available if you need a distraction-free run.

Related tools:

Tags: #guide, #utility, #developer, #milliseconds, #duration, #epoch

Related guides: