I have code like the following:
oTable = $('#dataTable').dataTable({
"sScrollX": "100%",
"bScrollCollapse": true,
iDisplayLength: -1,
aLengthMenu: [[-1, 25, 50, 200, "All"], [10, 25, 50, 200, "All"]],
aoColumnDefs: [
{ "sSortDataType":"dom-data-rk", "aTargets": ["sort-data-rk"] },
{ "sType": "date-uk", "aTargets": ["sort-date-uk"] },
{ "sType": "datetime-uk", "aTargets": ["sort-datetime-uk"] }
]
});
Is there a way I can time how long this code takes to execute using javascript or jQuery. Something like the Stopwatch method in C#?
You can use console time and verify how long it takes.
the variable time will have the result in miliseconds
example:
http://jsfiddle.net/dadviegas/dV9rf/
for all browsers
i have added this solution in jsfiddle