various improvements, added timing for POSIX systems