An extension that computes your time watching youtube and notifies it periodicly. The period before notification is 20 seconds by default but it can be fixed on the option page.
To download this add-on, visit: https://addons.mozilla.org/en-US/firefox/addon/youtube-timer