Jquery and Ajax 404 Undefined Error
I would guess that the URL is wrong in your javascript.

Currently, if your site is on http://localhost, the page requested will be:

http://localhost/localhost/drupal/my_currenttime/10


When I suspect it should be:

http://localhost/drupal/my_currenttime/10


To fix that just add the http:// part to the beginning of the URL variable in your JS code, or make it relative:

url: '/drupal/my_currenttime/10'