Conveniently log function duration