Click here to Skip to main content
15,909,953 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Chris Maunder9-Jan-18 14:24
cofounderChris Maunder9-Jan-18 14:24 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Jörgen Andersson9-Jan-18 21:59
professionalJörgen Andersson9-Jan-18 21:59 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
den2k889-Jan-18 21:23
professionalden2k889-Jan-18 21:23 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
kalberts10-Jan-18 0:52
kalberts10-Jan-18 0:52 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
den2k8810-Jan-18 0:58
professionalden2k8810-Jan-18 0:58 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Dar Brett10-Jan-18 3:11
Dar Brett10-Jan-18 3:11 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
ddyer10-Jan-18 5:36
ddyer10-Jan-18 5:36 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Robert Tax10-Jan-18 5:38
Robert Tax10-Jan-18 5:38 
I disagree - I have done such things often.
If you are writing software for an embedded system, it will often happen that the basic time tick is close to but not exactly a millisecond: for instance, with a 1MHz clock and a clock divider of 1024 you get 1.024 msec. You can still think of this as a millisecond, which is close enough for some purposes. But if you want to scale to a longer time period, you get errors. For instance, there are about 977 of your "milliseconds" in a second. So defining MILLISEC_PER_SEC as 977 is quite reasonable. Then 60 "seconds" is only off by .027 seconds. If you used the nominal 1000 "msec" per "sec", you'd be off by 1.44 seconds.
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Davyd McColl10-Jan-18 7:20
Davyd McColl10-Jan-18 7:20 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Gerry Schmitz11-Jan-18 6:05
mveGerry Schmitz11-Jan-18 6:05 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Member 1215099311-Jan-18 9:34
Member 1215099311-Jan-18 9:34 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
jschell14-Jan-18 5:52
jschell14-Jan-18 5:52 
GeneralRe: MILLISEC_PER_SEC is never needed Pin
Kirill Illenseer15-Jan-18 4:23
Kirill Illenseer15-Jan-18 4:23 
GeneralAPOD Pin
R. Giskard Reventlov9-Jan-18 4:21
R. Giskard Reventlov9-Jan-18 4:21 
GeneralRe: APOD Pin
glennPattonWork39-Jan-18 5:02
professionalglennPattonWork39-Jan-18 5:02 
Generalreading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 2:58
mvaraddevus9-Jan-18 2:58 
GeneralRe: reading the threading chapter C# 7.0 Pin
Cornelius Henning9-Jan-18 3:19
professionalCornelius Henning9-Jan-18 3:19 
GeneralRe: reading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 3:58
mvaraddevus9-Jan-18 3:58 
GeneralRe: reading the threading chapter C# 7.0 Pin
Ehsan Sajjad9-Jan-18 4:19
professionalEhsan Sajjad9-Jan-18 4:19 
GeneralRe: reading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 5:00
mvaraddevus9-Jan-18 5:00 
GeneralRe: reading the threading chapter C# 7.0 Pin
RickZeeland9-Jan-18 4:01
mveRickZeeland9-Jan-18 4:01 
GeneralRe: reading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 4:14
mvaraddevus9-Jan-18 4:14 
GeneralRe: reading the threading chapter C# 7.0 Pin
Ehsan Sajjad9-Jan-18 4:21
professionalEhsan Sajjad9-Jan-18 4:21 
GeneralRe: reading the threading chapter C# 7.0 Pin
raddevus9-Jan-18 5:02
mvaraddevus9-Jan-18 5:02 
GeneralRe: reading the threading chapter C# 7.0 Pin
Pete O'Hanlon9-Jan-18 5:09
mvePete O'Hanlon9-Jan-18 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.