MFC:	1.80-1.83
MFC:	1.80-1.83

- Prefer clock_gettime(2) over gettimeofday(2) and use CLOCK_MONOTONIC
as it is only used to track elapsed time.[1]
- Fix compiler warnings and style(9) bugs.

[1] CLOCK_MONOTONIC is used on here because CLOCK_MONOTONIC_FAST is
unimplemented on RELENG_6.

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase