its not haram. The man probably meant dont waste time unnecessarily on the internet instead use this precious time in gaining good deeds as much as possible.