Problably a more portable way of computing the time difference