Two units that share the same dashboards

Profilers, audio software and network tools mix microseconds and milliseconds on one screen. A database client may print query time in microseconds while the web server log shows milliseconds, and an audio interface panel gives latency in samples that you convert to either. This page handles the step between the two units, a factor of 1,000, so you can line up numbers from different tools. It is a straightforward conversion, but with timings the unit matters a great deal. A response of 850 µs is fast, and 850 ms is slow, a thousand-fold difference that a missing symbol can hide. The page keeps the comparison visible.

The factor of one thousand

The prefix milli means 10^-3 and micro means 10^-6, so 1 ms equals 1,000 µs. The page computes ms = µs × 0.001. The default 10 µs gives 0.01 ms, and 1,000 µs gives 1 ms. The conversion shifts the decimal point by three places to the left, and the number gets smaller because the unit gets larger. Both prefixes are decimal prefixes in the SI Brochure, and the second is the SI base unit of time. Because the factor is exact, any difference between the page and your hand calculation comes from a slip in the decimal place, not from rounding.

Audio buffer sizes

Audio interfaces set latency through the buffer size in samples. At a sample rate of 48,000 Hz, a buffer of 128 samples lasts 128 / 48,000 s, which is 2,666.67 µs or 2.667 ms. A buffer of 256 samples lasts 5,333.33 µs, or 5.333 ms. At 44,100 Hz, a buffer of 64 samples lasts 1,451.25 µs, or 1.451 ms. The latency a musician perceives also includes converters and drivers, so the buffer time is only part of it. Still, converting the buffer length to milliseconds is the first step in budgeting a round trip. Enter the microsecond figure that your software reports and read the millisecond value the interface manual uses.

Frame times for video and games

A display refreshing at 60 frames per second has a frame time of 16,666.67 µs, which is 16.667 ms. At 30 frames per second the frame time is 33.333 ms, and at 24 frames per second it is 41.667 ms, or 41,666.7 µs. Game developers talk about a frame budget in milliseconds, while a profiler may log individual tasks in microseconds. If a physics step takes 2,400 µs, that is 2.4 ms, about 14 percent of a 60 frames-per-second frame. Converting the numbers makes the budget clear. Dividing the task time in milliseconds by the frame time in milliseconds gives the share of the frame it consumes.

Network and database timings

A request inside a local network can finish in well under a millisecond. A round trip logged as 850 µs is 0.85 ms. A database query that takes 12,500 µs takes 12.5 ms. The browser Performance API reports times in milliseconds with fractional parts, and fractions give microsecond-scale detail where the browser allows it. When you compare the server timing in microseconds with the client timing in milliseconds, convert one of them first, then subtract to estimate the network and queuing share. Be careful with clock sources. Times from two different machines are not comparable to microsecond accuracy unless their clocks are tightly synchronized, so compare durations measured on one machine.

Polling rates and USB frames

Input devices are described by polling rate. A mouse polling at 1,000 Hz reports every 1,000 µs, which is 1 ms. A mouse polling at 8,000 Hz reports every 125 µs, or 0.125 ms. USB full-speed devices exchange data in frames of 1 ms, and high-speed USB divides each frame into microframes of 125 µs. These figures show up in specification sheets, and converting between µs and ms helps compare them with latency numbers in game and software settings. The conversion also reminds you that a higher rate gives a shorter interval, so the interval in milliseconds goes down as the rate goes up. A 2,000 Hz setting gives 500 µs, or 0.5 ms, and a 4,000 Hz setting gives 250 µs, or 0.25 ms. Each doubling of the rate halves the interval, which is why the gains in responsiveness shrink as the numbers climb and the interval approaches the noise of the rest of the system.

From milliseconds to microseconds

Choose milliseconds as the source and microseconds as the target to multiply by 1,000. A timeout of 20 ms becomes 20,000 µs, and 0.5 ms becomes 500 µs. A round-trip budget of 7.5 ms becomes 7,500 µs. Use this when a function takes microseconds, such as a delay call on a microcontroller, and your design target is written in milliseconds. Writing the unit in the name of the variable, for example timeout_us or timeout_ms, prevents the classic mistake of passing 20 to a function that expects 20,000. If the page result seems off by a factor of 1,000, look for a swapped dropdown.

Slow-query logs with six decimals

Database servers can write a slow-query log in which each entry carries a duration in seconds with six decimal places. A line showing 0.012500 means 0.0125 s, which is 12,500 µs, or 12.5 ms. A line showing 0.000850 is 850 µs, which is 0.85 ms. Reading the digits after the decimal point as microseconds works because the sixth place is one microsecond, and moving the point three places gives milliseconds. When you rank queries by cost, convert all entries to the same unit before you add them. A query that runs 40 times a second at 2,500 µs each uses 100,000 µs of server time per second, which is 100 ms, or a tenth of one core. That kind of estimate shows which queries deserve tuning.

Single latency figures hide worst cases

The page converts a duration. It does not measure latency, judge whether a delay is acceptable or account for jitter, clock drift or averaging. A single figure such as 2.667 ms for a buffer says nothing about the worst case that a real system experiences. Use percentile statistics from your own measurements when performance matters, and keep the raw microsecond values so you can recompute without rounding error. The page also assumes decimal prefixes and plain durations, so it should not be used for timestamps that carry an epoch or a time zone.