mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
added profile func, shorter getRecentReplies
This commit is contained in:
@@ -6,6 +6,12 @@
|
||||
if ('undefined' === typeof window) {
|
||||
fs = require('fs');
|
||||
XRegExp = require('xregexp').XRegExp;
|
||||
|
||||
process.profile = function(operation, start) {
|
||||
var diff = process.hrtime(start);
|
||||
console.log('%s took %d milliseconds', operation, diff[0] * 1e3 + diff[1] / 1e6);
|
||||
}
|
||||
|
||||
} else {
|
||||
XRegExp = window.XRegExp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user