Skip to content

Commit

Permalink
rollback gedatalist to promise
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Sep 21, 2016
1 parent 517bb26 commit 1b8aad0
Show file tree
Hide file tree
Showing 2 changed files with 210 additions and 138 deletions.
9 changes: 6 additions & 3 deletions src/cli/helpers/abe-time-mesure.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ export default class TimeMesure {

constructor(str) {
this._name = str
console.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * *')
if(typeof str !== 'undefined' && str !== null) {
console.log('start: ' + clc.green(str))
if(typeof this._name !== 'undefined' && this._name !== null) {
console.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * *')
console.log('start: ' + clc.green(this._name))
}
this._dateStart = new Date()
}
Expand All @@ -30,6 +30,9 @@ export default class TimeMesure {
*/
duration(str) {
var d = new Date(new Date().getTime() - this._dateStart.getTime()).getTime()
if(typeof this._name === 'undefined' || this._name === null) {
console.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * *')
}
console.log((this._name ? 'end ' + this._name : "") + "(" + clc.green(this._msToTime(d)) + ") " + (str ? str : ""))
}
}
Loading

0 comments on commit 1b8aad0

Please sign in to comment.