I'm a software developer, but I'm not the "manager of my time" because I have a boss who gives me tasks and deadlines. Sometimes I happen to be inactive for hours, sometimes even days. During these periods I always look at the code and study or stuff like that, so I don't need to know what to do to let the time pass by.
What is the correct amount of time after being inactive to notify it to my boss?
To clarify: if I finish my work before deadlines I always give a notice to my boss, but for various reasons(my boss himself is buried with legal papers, I must wait for other developers to finish their work and so on...), sometimes it just happens to wait.
... be inactive for hours, sometimes even days
shows a lack of being able to work on your own. If you can't work out you should be doing something at work after a few hours never mind a few days something is seriously wrong. You should be letting whoever assigns your tasks know as soon as they are done. For all you know they are waiting for you to finish so they can assign something else, in the meantime thinking "Damn Anon sure does take a long time to finish their tasks..." Which is obviously a bad mark against yourself.