It freezes because you have an infinite loop.
I don't know what you're using this for, but if you want to have the time appear every second or whatever, use timers:
/.timerClock 0 1 echo -qa $asctime($time)
Remember that if you do a .echo (with the .), you will never see the echo.