4 ms·
A couple different ways to avoid the issue: 1: Size the type used to store the value so that it cannot overflow even in corner cases such as a plane being on f
by sbradford26 8y ago
A couple different ways to avoid the issue:
1: Size the type used to store the value so that it cannot overflow even in corner cases such as a plane being on for several months. Ex. going from a 32 bit int to a 64 bit.
2: Have a flag that you set when the counter overflows, so you can calculate the actual time. Given the length of time that planes are on this would give you enough time.
3:Lessen the precision of the counter (Probably not an option since the precision is usually a requirement)