Implemented a time thread to keep a Unix timestamp & localtime structure updated at all times, so that we don't need to rely on the expensive time() syscall in regular code.