Make sure you spread the word among your colleagues that you have worked for so-so hours for so-so work which was given by your boss, which he finally did not need. Tell them how much of your time was wasted in doing nothing!! The next time your boss asks you to do some work, casually ask him again whether he really needs the work to be done this time and no cancellations last moment. This might make him feel guilty.