Commit 05aaa787 authored by Ahmad Nemati's avatar Ahmad Nemati

git pu

parent f9844b1d
var startTime = performance.now()
const fs = require('fs');
let moment=require('moment-timezone')
//tesT()
let closeTime=1611750600000
let openTime=1611304200000
tesT()
function tesT()
{
let d=getMinDiff('2012-10-2','2012-10-10')
console.log(d)
}
// <---- measured code goes between startTime and endTime
var endTime = performance.now()
function getDaysDiff(start, closed) {
//2019-05-25T05:34:27+04:30
var now = moment(moment(closed,'YYYY-MM-DD').format());
var end = moment.duration(now.diff(moment(start,'YYYY-MM-DD')));
// console.log(parseInt(end.asDays()))
return parseInt(end.asDays())
}
//fs.appendFileSync('error.txt', 'test new line\n');
\ No newline at end of file
console.log(`Call to doSomething took ${endTime - startTime} milliseconds`)
\ No newline at end of file
......@@ -16,7 +16,7 @@ async function run() {
let total = []
let levelPlus = []
let types = []
var startTime = performance.now()
for (let i = 0; i < configs.length; i++) {
......@@ -41,6 +41,8 @@ async function run() {
}
adder = _.orderBy(adder, ['total'], ['asc']);
var endTime = performance.now()
console.log(`Call to doSomething took ${endTime - startTime} milliseconds`)
for (let i = 0; i < adder.length; i++) {
for (let z = i + 1; z < adder.length; z++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment