Cleanup model code

This commit is contained in:
Daniel Saewitz
2013-05-05 13:47:50 -04:00
parent 3526cd6f72
commit 669cdb35b6
+4 -2
View File
@@ -75,12 +75,14 @@ module.exports.app = (appExports, model, app) ->
browser = require './browser'
helpers = require './helpers'
model.setNull '_currentTime', +new Date()
_currentTime = model.at '_currentTime'
_currentTime.setNull +new Date()
# Every 60 seconds, reset the current time so that the chat
# can update relative times
setInterval ->
model.set '_currentTime', +new Date()
_currentTime.set +new Date()
, 60000
user = model.at('_user')