|16:45||• Closed ticket [15bcaa7d13]: Add helper functions for time intervals plus 4 other changes artifact: a84bd97cc4 user: js|
|00:47||• New ticket [15bcaa7d13]. artifact: ffbf0127af user: js|
|Title:||Add helper functions for time intervals|
|Last Modified:||2021-08-07 16:45:06|
|Version Found In:||Milestone:||1.0|
js added on 2021-04-17 00:47:27:
Time intervals are currently doubles with no further abstraction. This means that time intervals are added, subtracted and compared using regular double operations. This is problematic on platforms on which double is slow or even non-existent. It would be better to make it transparent and offer helper functions: This would allow to make it struct with two integers in the future.
js added on 2021-08-07 16:45:06:
This is probably not worth it, as pretty much all compilers allow to generate code that uses doubles just via integer arithmetics. Yes, this is slow, but nothing should use so many time intervals that this is actually a problem. Using a struct that is just a double on some platforms and two integers on others would result in different precision on different systems - something that is very much not desirable. It would also make it much harder to serialize time intervals or dates.