Seconds to msec
Seconds to msec means multiply the second count by 1,000. Msec to seconds means divide by 1,000. Msec is an abbreviation for millisecond, and 1,000 milliseconds equal 1 second.
How it works
A millisecond is one thousandth of a second. The letters msec stand on that unit. They do not stand on microsecond (one millionth of a second, often µs or us) and they do not stand on minute. If a log says 250 msec, that is 0.25 seconds, not 250 minutes and not 250 microseconds.
To convert, keep one factor in your head: 1 s = 1,000 msec. Then: seconds to msec: seconds × 1,000 msec to seconds: msec ÷ 1,000 1 second = 1,000 msec 0.5 seconds = 500 msec 1 msec = 0.001 seconds The conversion does not care whether the original reading came from a stopwatch, a ping, or a sleep() call. Duration is duration. What you must not do is treat msec as a brand-new scale with a private factor. It is milliseconds with a different spelling.
If a system prints msec with extra digits, those digits are still parts of a millisecond only if the device says so. A value of 1.5 msec is one and a half milliseconds, which is 0.0015 seconds. A value of 1.5 s is one and a half seconds, which is 1,500 msec. The decimal point stays attached to the unit that was labeled.
Ms, msec, and the look-alikes
Msec shows up in older code, network tools, and hardware notes because ms and msec have both been used as short forms. Ms can also be read as milliseconds or, in other fields, as a title or as a sample. In a time column next to timeouts and latencies, msec is meant as millisecond. If the same file also uses ms, treat them as the same unit unless the file’s own header defines a split — and a split would be a defect, not a second physics.
Microseconds are a thousand times smaller than milliseconds. 1,000 microseconds = 1 millisecond. 1,000,000 microseconds = 1 second. If you convert seconds to msec when the API wanted microseconds, you will be short by a factor of 1,000. If you convert seconds to microseconds when the API wanted msec, you will be long by the same factor. Read the parameter name. Do not assume every “small time” field is msec.
2 seconds to msec is 2,000 msec. 0.001 seconds to msec is 1 msec. 10,000 msec to seconds is 10 seconds. 250 msec to seconds is 0.25 seconds. If you need mixed seconds and milliseconds, convert everything to one unit, add, then convert back if you must display both fields.
Msec is a spelling, not a spare universe. If it meant minutes, a 200 msec timeout would last three hours and twenty minutes, and nobody would call it a timeout. When you log both seconds and msec, pick a convention and keep it. Some teams store seconds as a decimal (1.250) and never print msec. Some store an integer msec count (1250) and never print a decimal second. Both are honest. Switching mid-file is how a chart axis silently stretches by a thousand.
Questions and answers
- How do I convert seconds to msec?
- Multiply by 1,000. One second is 1,000 milliseconds.
- How do I convert msec to seconds?
- Divide by 1,000. One millisecond is 0.001 seconds.
- Is msec the same as a microsecond?
- No. Msec is a millisecond. A microsecond is one thousandth of a millisecond, often written µs or us.
Related guides
100 seconds
100 seconds equals one minute forty seconds, or 100 s, or PT1M40S. It is a short duration. It is not 1:00, and it is not a hundred on a digital clock.
120 minutes in hour
120 minutes is 2 hours, because one hour holds 60 minutes. Write it as 2:00 or as two hours; it is not 120 hours.
13 hour cast
A 13 hour cast writes thirteen hours as a label in front of the word cast. Most people who type it want the actors in the film 13 Hours. The number is a duration, not a clock time.