Skip to content

Commit

Permalink
Custom request time
Browse files Browse the repository at this point in the history
  • Loading branch information
g-viet committed Apr 25, 2019
1 parent 37700c8 commit f26bd43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export class Stock {
this.openPrice = stockPrices['o'];
this.highestPrice = stockPrices['h'];
this.lowestPrice = stockPrices['l'];
this.time = stockPrices['t'];
this.time = new Date();
}

printf () {
console.log(`${this.code}\t${this.f(this.currentPrice)}\t\t${this.f(this.volume)}\t\t${this.f(this.openPrice)}\t\t${this.f(this.highestPrice)}\t\t${this.f(this.lowestPrice)}\t\t${this.time}`);
console.log(`${this.code}\t${this.f(this.currentPrice)}\t\t${this.f(this.volume)}\t\t${this.f(this.openPrice)}\t\t${this.f(this.highestPrice)}\t\t${this.f(this.lowestPrice)}\t\t${this.time.toLocaleTimeString()}`);
}

f(n: number) {
Expand Down

0 comments on commit f26bd43

Please sign in to comment.