Never told anyone on his team, least of all his manager. Spent a year or so doing no more than 10 minutes work per day. Learned Python and after a year revealed all and left for a better job. Apparently there was chaos afterwards.
So, either tell your direct manager and be up front about it, or say nothing and use the free time to do something useful.