API: Fixed timeval struct formatting .

Without this change API commands "coin" and "stats" are broken, i.e. returned data is corrupted.