Commit Graph

7 Commits

Author SHA1 Message Date
Pietro Gagliardi efe118a81d Resolved warning suppression issue in timerDurationString(). It turns out BOTH this AND the solution were both in timer.c, and I somehow did not notice :V 2019-06-01 12:06:09 -04:00
Pietro Gagliardi c090dacc4a Switched the test code to use bool wherever appropriate. Will try to do this for the rest of libui, and then I'll deduplicate the allocation and array code. 2019-05-30 22:09:45 -04:00
Pietro Gagliardi d49f8ae7e6 Switched the macOS code to use timerprivInt128ToUint64(). Also rearranged the arguments of timerprivInt128ToInt64() and added proper timerDurationMin/Max constants instead of the incorrect-for-that-function timerTimeMin/Max in the Windows code. 2019-05-05 11:16:17 -04:00
Pietro Gagliardi ff803bf792 And implemented 128-bit muldiv on Windows. 2019-05-05 11:03:17 -04:00
Pietro Gagliardi 288c74b026 Implemented the new MulDiv128 stuff on macOS. To make things easier in regards to signedness, this implementation also uses a base, like the Unix one, and the mach_timebase_info() conversion is done in timerMonotonicTime() instead. (Also added the admittedly-redundant-since-the-current(ish)-implementation-cannot-fail error check to mach_timebase_info().) As a result, timerTimeSub() can now be end - start on all platforms. Also found and fixed bugs in the actual muldiv128 algorithm implementation. Next up: Windows. 2019-05-05 03:17:11 -04:00
Pietro Gagliardi 952b36b1c2 Added proper 128-bit muldiv() stuff for macOS and Windows. Will actually use them next. Also fixed compiling on non-Windows. 2019-05-05 02:17:11 -04:00
Pietro Gagliardi 00411a4d07 Moved all the test infrasturcture files into a subdirectory of test/ called lib/. 2019-05-04 16:53:54 -04:00