Index: test/mjsunit/timer.js |
diff --git a/test/mjsunit/regress/regress-2624.js b/test/mjsunit/timer.js |
similarity index 90% |
copy from test/mjsunit/regress/regress-2624.js |
copy to test/mjsunit/timer.js |
index 2bfd7b2585016cda6db68fbac10d4a395e7ece09..9b8dc29fe1641f1b79c538413fa00f625d765bce 100644 |
--- a/test/mjsunit/regress/regress-2624.js |
+++ b/test/mjsunit/timer.js |
@@ -25,12 +25,11 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --print-code |
+// Tests timer milliseconds granularity. |
-var source = '"snowmen invasion " + "'; |
-for(var i = 0; i < 800; i++) { |
- source += '\u2603'; |
+var start = Date.now(); |
+var end = Date.now(); |
+while (end - start == 0) { |
+ end = Date.now(); |
} |
-source += '"'; |
-eval(source); |
- |
+assertTrue(end - start <= 2); |