misc: use Date.now() instead of "new Date().getTime()"
This commit is contained in:
parent
42a1390170
commit
72236a8426
3 changed files with 5 additions and 5 deletions
|
|
@ -71,7 +71,7 @@ module.exports = {
|
|||
},
|
||||
|
||||
reloadCss: function(){
|
||||
var queryString = '?reload=' + new Date().getTime()
|
||||
var queryString = '?reload=' + Date.now()
|
||||
DOM.each(document, 'link[rel="stylesheet"][hot-reload]', (el)=>{
|
||||
el.href = el.href.replace(/\?.*|$/, queryString)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ module.exports = (element, callback)=>{
|
|||
|
||||
element.addEventListener('fast-click', (event)=>{
|
||||
|
||||
var tapTime = new Date().getTime(),
|
||||
var tapTime = Date.now(),
|
||||
tapLength = tapTime - lastTapTime,
|
||||
eventData = event.detail
|
||||
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ module.exports = class Visualizer extends _plots_base {
|
|||
|
||||
startLoop() {
|
||||
|
||||
this.clock = new Date().getTime()
|
||||
this.clock = Date.now()
|
||||
if (!this.looping) {
|
||||
this.lastUpdate = new Date().getTime()
|
||||
this.lastUpdate = Date.now()
|
||||
this.looping = true
|
||||
this.ticks = 0
|
||||
this.loop()
|
||||
|
|
@ -60,7 +60,7 @@ module.exports = class Visualizer extends _plots_base {
|
|||
|
||||
loop() {
|
||||
|
||||
var t = new Date().getTime()
|
||||
var t = Date.now()
|
||||
|
||||
if (t -this.clock >= this.watchDuration) {
|
||||
this.looping = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue