]> source.dussan.org Git - jquery-ui.git/commitdiff
Dialog: Remove use of `$.now()` in performance test
authorScott González <scott.gonzalez@gmail.com>
Thu, 3 Mar 2016 18:38:57 +0000 (13:38 -0500)
committerScott González <scott.gonzalez@gmail.com>
Thu, 3 Mar 2016 18:38:57 +0000 (13:38 -0500)
tests/visual/dialog/performance.html

index 20adbfa6bdf341e89a3f7b09776ffd842e9ed236..45ef909417587198ee33980c99221605b7fe4784 100644 (file)
                        html = new Array( 500 ).join( $.trim( $( "#template" ).html() ) );
                $( html ).appendTo( "body" );
 
-               start = $.now();
+               start = new Date();
                $( "#dialog" ).dialog({
                        modal: true,
                        autoOpen: false
                });
-               $( "<li>Create: " + ($.now() - start) + "ms</li>" ).appendTo( "#log" );
+               $( "<li>Create: " + (new Date() - start) + "ms</li>" ).appendTo( "#log" );
 
                $( "#opener" ).on( "click", function() {
-                       start = $.now();
+                       start = new Date();
                        $( "#dialog" ).dialog( "open" );
-                       $( "<li>Open: " + ($.now() - start) + "ms</li>" ).appendTo( "#log" );
+                       $( "<li>Open: " + (new Date() - start) + "ms</li>" ).appendTo( "#log" );
                });
        </script>
 </head>