3 ms·
Today I was refactoring a codebase I maintain. In one domain the program thinks of time in 1/256ths second ticks. And in another it thinks in terms of 1/32768t
by Gibbon1 6y ago
Today I was refactoring a codebase I maintain.
In one domain the program thinks of time in 1/256ths second ticks. And in another it thinks in terms of 1/32768ths of a second. Elsewhere it thinks in terms of ms.
Having them all represented as an int is often confusing. For me that wrote the code. God help anyone else.
- cphoover 6y agoIf there is a practical reason you aren't using a uniform format for time I would consider this a case where compile-time type validation make sense... but for most applications I work on I would argue this is not a concern.