Modified threep.c to fix sign in time - boundary crossing