HumanDynamics / openbadge

MIT License
49 stars 19 forks source link

BadgeFramework has potential bug in OpenBadge get_status #96

Closed OrenLederman closed 6 years ago

OrenLederman commented 6 years ago

get_status gets seconds and milliseconds, but in two different commands. Since several milliseconds will elapse between these two commands, the milliseconds might belong to the next seconds.

For example, if the time for the first command is 1111.999, and it takes 20 ms to call the next command, the next command will get the millisecond for 1112.019, which is wrong

OrenLederman commented 6 years ago

This might be a more general problems in more places

OrenLederman commented 6 years ago

Yup, most of the functions in badge.py do that.

OrenLederman commented 6 years ago

Another thing I should change (and test) is the way these functions can get timestamps as a variable. It's better if they get an actual timestamp and split it, instead of getting them as separate variables.

OrenLederman commented 6 years ago

closed #102