1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-22 12:33:29 +00:00

... and I guess an instant maximal simplification is also easy if length ends up being 0

This commit is contained in:
Thomas Harte 2016-12-29 11:02:21 -05:00 committed by GitHub
parent 54900ca3fb
commit bbd94749f4

View File

@ -246,6 +246,12 @@ struct Time {
inline void install_result(uint64_t long_length, uint64_t long_clock_rate)
{
// TODO: switch to appropriate values if the result is too large or small to fit, even with trimmed accuracy.
if(!long_length)
{
length = 0;
clock_rate = 1;
return;
}
while(!(long_length&1) && !(long_clock_rate&1))
{