fixed js implementation of sys.elapsed