Some compilation fixes.
Add some comments to keep track of timer units.
Compile on android.
Work around NaN issues.
Fix weird ssize_t redifinition problems.