receiptomatic-www: common: Switch to clock_gettime()
receiptomatic-www: common: Switch to clock_gettime()

According to the Linux gettimeofday(2) man page this is marked as
deprecated.

    "POSIX.1-2008 marks gettimeofday() as obsolete, recommending the
     use of clock_gettime(2) instead."

So switch d_fprintf over to clock_gettime().

One difference with clock_gettime() is that it gives us nanoseconds
rather than microseconds. However microseconds is plenty accurate enough
for us, so we just divide the nanoseconds by 1000 to truncate it down to
microseonds. This is sufficient for our needs.

Signed-off-by: Andrew Clayton <02e0a999c50b1f88df7a8f5a04e1b76b35ea6a88@opentechlabs.co.uk>

ac000/receiptomatic