cast ttl to primitive long for more efficient boxing