`time_t` may not be `long`, for examples, unsigned (long) int,
long long int (64bit integer type on 32bit arch), double, and so on.
Change to use difftime(3) to retrieve seconds.
Signed-off-by: OBATA Akio <obache@wizdas.com>
(cherry picked from commit 9b8b7c1299)